Creates a new browser tab, and returns its scoped Context.
Context object.
Optional
URL to navigate to.
Context object where page is the newly created tab.
The tab will be created in the same browser of the given ctx.
ctx
const newPageCtx = await createPage(ctx, 'https://example.com');await click(newPageCtx, 'button[id="submit"]'); Copy
const newPageCtx = await createPage(ctx, 'https://example.com');await click(newPageCtx, 'button[id="submit"]');
Creates a new browser tab, and returns its scoped Context.