You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Searched around but couldn't find an example of this. I have a bunch of asyncio tasks and I'm trying to use the Tab and Browser objects in different ones, but all my await function invocations of the Tab or Browser objects hang in the child tasks. So here's an example
driver: cdp_driver.cdp_util.Browserasyncdefwatch_participant_count():
"""Watch the participant count and trigger shutdown when everyone leaves"""last_count=Nonelogging.info("Starting participant count watcher...")
page=driver.main_tablogging.info("Switching to Google")
awaitdriver.get("https://google.com") # HANGS HERE IF INVOKED AS A TASKlogging.info("Switched to Google")
# Try to find the participant count elementlogging.info("Looking for participant count element...")
count_element=awaitpage.select('div.uGOf1d', 1) # ALSO HANGS HERE IF INVOKED AS A TASK
# other functionasyncdefjoin_google_meet():
globaldriver, ffmpeg_processlogging.info("Starting Google Meet session")
driver=awaitcdp_driver.cdp_util.start_async(xvfb=True, lang="en")
# ...# other stuff...# ...# Start participant count watcherparticipant_watcher_two=awaitwatch_participant_count() # This works fine# causes problems in the function: participant_watcher = asyncio.create_task(watch_participant_count())
I've also tried for example directly passing in the driver and or page vs global objects, but it also seems to hang. Is there any way to do this?
The text was updated successfully, but these errors were encountered:
Hi Mike,
Searched around but couldn't find an example of this. I have a bunch of asyncio tasks and I'm trying to use the
Tab
andBrowser
objects in different ones, but all myawait
function invocations of theTab
orBrowser
objects hang in the child tasks. So here's an exampleI've also tried for example directly passing in the driver and or page vs global objects, but it also seems to hang. Is there any way to do this?
The text was updated successfully, but these errors were encountered: