sdk.watcher.waitforpagechange
Home > @matterway/sdk > Watcher > waitForPageChange
Watcher.waitForPageChange() function
High level helper which is resolved either on page mutation or navigation.
Signature:
export declare function waitForPageChange(ctx: Context, options?: Partial<waitForPageChangeOptions>): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
options | Partial<waitForPageChangeOptions> | (Optional) Mutation and navigation timeoutss |
Returns:
Promise<void>
Resolves on page mutation or navigation.
Example
async function step(ctx: Context) {
await waitForPageChange(ctx);
}