[BUG] context.newPage always launches in Default chrome profile
See original GitHub issueContext:
- Playwright Version: 0.10.0
- Operating System: Mac
- Extra: Using chrome and not the bundled chromium
Code Snippet Gist link: https://gist.github.com/VikramTiwari/56a6ff6d46496efc3613d624c9e8cd80
Describe the bug
- Would have expected the new page to open in the same context where the browser was launched with.
- Or a better feature would be to launch pages in specific chrome profiles
Another connected bug:
- I would have expected
userDataDir
to work properly but seems like it defaulted to using the temporary location
Screenshot:
From screenshot:
- Profile path should be “Profile 1” for both pages
- Profile path should start be the
${userDataDir}/${profileId}
vs temporary path it is right now.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Reset Chrome settings to default - Google Chrome Help
Reset Chrome settings to default · On your computer, open Chrome. · At the top right, click More More and then Settings and...
Read more >648787 - "Open as" different profile option in right click context ...
I don't know how to reproduce this issue. However, this issue is present on my main Chrome profile but is not present on...
Read more >Force Chrome to open new pages in new window, not tab ...
Solution · Go to HKEY_CLASSES_ROOT\http\shell\open\command · You should see one key, named (Default) . Double click this to get an editing popup. ·...
Read more >How to completely reset the Google Chrome browser to its ...
Note that in Chrome, you can create multiple user profiles so that each user will have its own settings, bookmarks, history, and extensions....
Read more >Why is Chrome opening everything in a new window? - Quora
Launch Chrome and find your account on the top right of the screen. It is the image or initial you have set. Next,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In 0.10 you need to use
browser.defaultContext
to fetch context associated with userDataDir. All new contexts you create are incognito there.In the latest version of the Playwright code we added explicit
launchPersistent(userDataDir)
option that returns aBrowserContext
that corresponds to that profile directory and removedbrowser.defaultContext
.Thanks @pavelfeldman 😃