sdk.watcher.waitfornavigation
Home > @matterway/sdk > Watcher > waitForNavigation
Watcher.waitForNavigation() function
High level helper which is resolved on navigation.
Signature:
export declare function waitForNavigation(ctx: Context, options?: Partial<WaitForNavigationOptions>): Promise<import("puppeteer-core").HTTPResponse | null>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
options | Partial<WaitForNavigationOptions> | (Optional) Timeout and waitUntil option. |
Returns:
Promise<import("puppeteer-core").HTTPResponse | null>
Resolves on navigation.
Example
async function step(ctx: Context) {
await waitForNavigation(ctx);
}