[Feature] support 'private mode' In Firefox
See original GitHub issueHello all,
First, we’ve been using Playwright to test all three supported browser platforms, and it’s been working well. I did discover something with Firefox though that was a bit confusing and believe warrants a question.
I have a project utilizing indexedDB
and was testing it with Playwright using newContext
. All tests passed without issue. But, we had a reported bug that our project failed in Firefox’s “private mode”. After some debugging, it seems accessing indexedDB
in Firefox’s private mode is denied, causing our code to fail.
Since we were running our tests with firefox.newContext()
, we believed it was running the tests against the browser’s version of private mode or “incognito” (since the API docs hint at this). But, that doesn’t seem to be entirely accurate as our Firefox tests passed in Playwright with newContext
, but failed in manual testing in Firefox’s private mode.
Question: Is it true that newContext
is similar to, but not actually, private mode/incognito?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
We can recycle this issue. Not saying we are going to do it, but let it be on file.
Yes, that is true! Also, a great discovery.
The idea behind the
newContext
is that it gives you a fresh isolated browser profile. But it aims at simulating a regular profile behavior, not an incognito one. Support for thebrowserType.newContext({private: true})
would be a fair feature request. Not saying that we will rush into implementing it while there are enough things to fix in the regular profile, but if it gets enough traction, we’ll definitely look at it.