Function createBackgroundPage

  • Creates a new background browser tab, and returns its scoped Context.

    Parameters

    • ctx: Context

      Context object.

    • Optional url: string

      URL to navigate to.

    Returns Promise<Context>

    Context object where page is the newly created background tab.

    Remarks

    The tab will be created in a minimized window of the same browser of the given ctx.

    Example

    const backgroundPageCtx = await createBackgroundPage(ctx, 'https://example.com');
    await click(backgroundPageCtx, 'button#submit');

Generated using TypeDoc