Matterway
    Preparing search index...

    Function createPage

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

      Parameters

      • ctx: Context

        Context object.

      • Optionalurl: string

        URL to navigate to.

      • Optionaloptions: GoToOptions

        Optional Puppeteer GoToOptions.

      Returns Promise<Context>

      Context object where page is the newly created tab.

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

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