Skip to main content

sdk.automation.selectnestedframe

Home > @matterway/sdk > Automation > selectNestedFrame

Automation.selectNestedFrame() function

Selects a nested IFrame, and returns its scoped Context.

Signature:

export declare function selectNestedFrame(ctx: Context, selectors: string[]): Promise<Context>;

Parameters

ParameterTypeDescription
ctxContextThe Context to scope the selection.
selectorsstring[]Selectors to each nested IFrame element.

Returns:

Promise<Context>

A new Context scoped from the innermost selected IFrame.

Example

const iframeCtx = await selectNestedFrame(ctx, ['iframe#top-frame','iframe#nested-frame']);
await click(iframeCtx, 'button#submit');