Skip to main content

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

ParameterTypeDescription
ctxContextContext object.
selectorsstring[]The list of selectors to wait for.
optionsWaitForSelectorOptions(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]);
}