Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running sessions with --incognito flag #3189

Open
christian-bromann opened this issue Mar 5, 2025 · 3 comments
Open

Support running sessions with --incognito flag #3189

christian-bromann opened this issue Mar 5, 2025 · 3 comments

Comments

@christian-bromann
Copy link
Contributor

It seems like WebDriver Bidi is failing to run the session when an --incognito flag is set. When adding the flag I get 2 browser windows (instead of usually 1 window with 2 tabs) where the Bidi is actually running incognito while the actual session isn't:

Image

Expected Behavior:

Have both browser windows open incognito.

@OrKoN
Copy link
Collaborator

OrKoN commented Mar 6, 2025

--incognito flag is generally flaky for automation and not well supported. We recommend using https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext to create an isolated context.

@christian-bromann
Copy link
Contributor Author

Is creating a new user context identical to running in incognito? Or are there specific browser settings that come when using incognito. I am especially wondering about this user comment:

but the prompts from chrome password manager, retained cache and similar are still causing a lot of troubles. Certain reported bugs in our system i was able to reproduce in incognito browser yet automation running same steps failed. Incognito is precious and i have not experienced any issues while in incognito before upgrade.

I was under the assumption that running a WebDriver session is essentially like running incognito but appears that some browser features behave differently.

@OrKoN
Copy link
Collaborator

OrKoN commented Mar 6, 2025

Is creating a new user context identical to running in incognito?

yes, in Chrome it is an off-the-record profile similar to incognito but you can have multiple. Each user context is isolated in terms of storage/cookies/caches.

I was under the assumption that running a WebDriver session is essentially like running incognito but appears that some browser features behave differently.

that is controlled by the --user-data-dir and whether it is empty or not. Other feature flags might be used to turn off Chrome features. I do not expect the password manager or caches to work in a fresh user context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants