@@ -483,38 +483,12 @@ async def wait_for_load_state(
483483 ) -> None :
484484 return await self ._main_frame .wait_for_load_state (** locals_to_params (locals ()))
485485
486- async def wait_for_navigation (
487- self ,
488- url : URLMatch = None ,
489- waitUntil : DocumentLoadState = None ,
490- timeout : float = None ,
491- ) -> Optional [Response ]:
492- return await self ._main_frame .wait_for_navigation (** locals_to_params (locals ()))
493-
494- async def wait_for_request (
495- self ,
496- urlOrPredicate : URLMatchRequest ,
497- timeout : float = None ,
498- ) -> Request :
499- async with self .expect_request (urlOrPredicate , timeout ) as request_info :
500- pass
501- return await request_info .value
502-
503- async def wait_for_response (
504- self ,
505- urlOrPredicate : URLMatchResponse ,
506- timeout : float = None ,
507- ) -> Response :
508- async with self .expect_response (urlOrPredicate , timeout ) as request_info :
509- pass
510- return await request_info .value
511-
512486 async def wait_for_event (
513487 self , event : str , predicate : Callable = None , timeout : float = None
514488 ) -> Any :
515489 async with self .expect_event (event , predicate , timeout ) as event_info :
516490 pass
517- return await event_info . value
491+ return await event_info
518492
519493 async def go_back (
520494 self ,
@@ -851,7 +825,7 @@ def expect_navigation(
851825 url : URLMatch = None ,
852826 wait_until : DocumentLoadState = None ,
853827 timeout : float = None ,
854- ) -> EventContextManagerImpl :
828+ ) -> EventContextManagerImpl [ Response ] :
855829 return self .main_frame .expect_navigation (url , wait_until , timeout )
856830
857831 def expect_popup (
0 commit comments