octaltree / playwright-rust

Playwright port to Rust
298 stars 31 forks source link

Creating an incognito window #15

Closed afbase closed 1 year ago

afbase commented 2 years ago

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.

octaltree commented 2 years ago

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.