const context = await browser.createIncognitoBrowserContext()
const page = await context.newPage()
page.setJavaScriptEnabled(false)
using (Browser browser = await Puppeteer.LaunchAsync(options))
{
// create the async context
var context = await browser.CreateIncognitoBrowserContextAsync();
// get the page created by default when launch async ran and close it whilst keeping the browser active
var browserPages = await browser.PagesAsync();
await browserPages[0].CloseAsync();
// create a new page using the incognito context
using (Page page = await context.NewPageAsync())
{
// do something
}
}
const context = await browser.defaultBrowserContext();
const page = await context.newPage();