Function createPage

  • Creates a new 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 tab.

    Remarks

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

    Example

    const newPageCtx = await createPage(ctx, 'https://example.com');
    await click(newPageCtx, 'button[id="submit"]');

Generated using TypeDoc