sync querySelectorAll
See original GitHub issuebrowser = Chrome(host="127.0.0.1", port=9222, timeout=3, retry=1)
tab = self.br.tabs[0]
tab.set_url('https://bing.com', timeout=5)
import time
time.sleep(3)
sel = tab.querySelectorAll('#sb_form_q')
INFO 2021-10-09 21:27:08 [ichrome] sync_utils.py(247): <Tab(chrome://newtab/)> send: {'method': 'Page.navigate', 'params': {'url': 'https://bing.com'}, 'id': 1}
INFO 2021-10-09 21:27:18 [ichrome] sync_utils.py(489): querySelectorAll crashed for: TypeError('the JSON object must be str, bytes or bytearray, not FailureException'), response: FailureException: TimeoutError()
File "/home/j/.local/lib/python3.9/site-packages/ichrome/sync_utils.py", line 492, in querySelectorAll
raise error
File "/home/j/.local/lib/python3.9/site-packages/ichrome/sync_utils.py", line 478, in querySelectorAll
response = json.loads(response)["result"]["result"]["value"]
File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not FailureException
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Is JavaScript in the DOM Async or Synchronous Code?
It isn't querySelectorAll is not an asynchronous function. how do you make sure that all of the 'div' elements have been stored to...
Read more >Using querySelector and querySelectorAll in JavaScript
This tutorial shows how the querySelector and querySelectorAll methods in JavaScript can be used to select DOM elements using CSS-style ...
Read more >Document.querySelectorAll() - Web APIs | MDN
The Document method querySelectorAll() returns a static (not live) NodeList representing a list of the document's elements that match the ...
Read more >A Bunch of Options for Looping Over querySelectorAll NodeLists
A common need when writing vanilla JavaScript is to find a selection of elements in the DOM and loop over them.
Read more >5 Ways To Loop Over DOM Elements With QuerySelectorAll in ...
There are a lot of ways to loop over a NodeList Object (List of DOM elements) that is returned by a querySelectorAll method!...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks, problem was on my side
Alright… I thought they are the same usage of Chrome CDP yet. Sometimes I just want to write a pure Websocket connection manager for CDP…