mokr.waiters.navigation
Classes
Class to listen to a |
Module Contents
- class mokr.waiters.navigation.NavigationWaiter(frame_manager: mokr.frame.FrameManager, frame: mokr.frame.Frame, timeout: int, wait_until: list[mokr.constants.LIFECYCLE_EVENTS] | mokr.constants.LIFECYCLE_EVENTS)
Class to listen to a
mokr.frame.FrameManagerfor specific navigation event(s) (LIFECYCLE_EVENTS) in the targetmokr.frame.Framefor up to a giventimeout. If all events not seen before timeout, raises aMokrTimeoutErrorexception.- Parameters:
frame_manager (FrameManager) – The
mokr.frame.FrameManagerto watch for lifecycle events.frame (Frame) – The
mokr.frame.Framethat seen events count toward.timeout (int) – Tiem in milliseconds to wait for event.
wait_until (list[LIFECYCLE_EVENTS] | LIFECYCLE_EVENTS) – Either a list of events or a single event to wait for.
- navigation_promise() → Any
Return the promise so errors can be handled externally.
- Returns:
Navigation promise.
- Return type:
Any
- cancel() → None
Stop this waiter, raise no errors.