showing results for - "pupetter create incognitor browser"
Jana
15 Feb 2019
1const context = await browser.createIncognitoBrowserContext()
2const page = await context.newPage()
3page.setJavaScriptEnabled(false)
4
Vanessa
13 May 2016
1const context = await browser.defaultBrowserContext();
2const page = await context.newPage();
Debora
27 Nov 2020
1using (Browser browser = await Puppeteer.LaunchAsync(options))
2{
3     // create the async context 
4    var context = await browser.CreateIncognitoBrowserContextAsync();
5
6    // get the page created by default when launch async ran and close it whilst keeping the browser active
7    var browserPages = await browser.PagesAsync();
8    await browserPages[0].CloseAsync();
9
10    // create a new page using the incognito context
11    using (Page page = await context.NewPageAsync())
12    {
13        // do something 
14    }
15}
16