📌  相关文章
📜  pupette 创建隐身浏览器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:37.889000             🧑  作者: Mango

代码示例3
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 
    }
}