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
Parameter | Type | Description |
---|---|---|
ctx | Context | The Context to scope the selection. |
selectors | string[] | 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');