File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -354,17 +354,6 @@ async def _wait_page_load(self, timeout: int = 300):
354
354
page_events_auto_enabled = True
355
355
await self .enable_page_events ()
356
356
357
- dom_loaded = asyncio .Event ()
358
- await self .on (
359
- PageEvents .DOM_CONTENT_LOADED ,
360
- lambda _ : dom_loaded .set (),
361
- temporary = True ,
362
- )
363
- try :
364
- await asyncio .wait_for (dom_loaded .wait (), timeout = timeout )
365
- except asyncio .TimeoutError :
366
- pass
367
-
368
357
page_loaded = asyncio .Event ()
369
358
await self .on (
370
359
PageEvents .PAGE_LOADED ,
@@ -373,7 +362,7 @@ async def _wait_page_load(self, timeout: int = 300):
373
362
)
374
363
375
364
try :
376
- await asyncio .wait_for (page_loaded .wait (), timeout = 5 )
365
+ await asyncio .wait_for (page_loaded .wait (), timeout = timeout )
377
366
except asyncio .TimeoutError :
378
367
pass
379
368
You can’t perform that action at this time.
0 commit comments