Function getFrame

  • Selects an IFrame, and returns its scoped Context.

    Parameters

    • ctx: Context

      The Context to scope the selection.

    • selector: string

      A selector to an IFrame element.

    • Optionaloptions: WaitForSelectorOptions

    Returns Promise<Context>

    A new Context scoped from the selected IFrame.

    If you need to select an iframe nested inside another iframe, use getNestedFrame instead.

    const iframeCtx = await getFrame(ctx, 'iframe#some-frame');
    await click(iframeCtx, 'button#submit');