question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] context.newPage always launches in Default chrome profile

See original GitHub issue

Context:

  • 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: Screen Shot 2020-02-05 at 3 15 38 PM

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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pavelfeldmancommented, Feb 11, 2020

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 a BrowserContext that corresponds to that profile directory and removed browser.defaultContext.

0reactions
VikramTiwaricommented, Feb 27, 2020

Thanks @pavelfeldman 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found