playwright-rust icon indicating copy to clipboard operation
playwright-rust copied to clipboard

Creating an incognito window

Open afbase opened this issue 3 years ago • 1 comments

Hello,

is there a way to create an incognito window in playwright-rust?

I see the comment https://github.com/octaltree/playwright-rust/blob/52c3bbdc00146046ddeec85866737856600f8f5b/src/api/browser_context.rs#L18

granted, I am not super familiar with playwright and still coming to terms with rustlang.

afbase avatar Sep 28 '21 03:09 afbase

This method in the example calls newContext.

let context = browser.context_builder().build().await?;

It creates a new browser context. It won't share cookies/cache with other browser contexts.

octaltree avatar Sep 28 '21 05:09 octaltree