sdk.watcher.waitforall
Home > @matterway/sdk > Watcher > waitForAll
Watcher.waitForAll() function
Waits for all selectors to become present.
Signature:
export declare function waitForAll(ctx: Context, selectors: string[], options?: WaitForSelectorOptions): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
selectors | string[] | The list of selectors to wait for. |
options | WaitForSelectorOptions | (Optional) Wait for selector options, options are passed to each selector. |
Returns:
Promise<void>
Example
async function step(ctx: Context) {
await waitForAll(ctx, [selector1, selector2]);
}