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 for running under browser profiles #93

Open
honzajde opened this issue Oct 12, 2022 · 2 comments
Open

Support for running under browser profiles #93

honzajde opened this issue Oct 12, 2022 · 2 comments
Labels

Comments

@honzajde
Copy link

This is especially useful to get rid of all those consent pop-ups that our modern legally compliant web is bloated with....

@simonw
Copy link
Owner

simonw commented Oct 14, 2022

I'm not sure if this is possible using Playwright. This page of documentation looks like it might be relevant here? https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context

@honzajde
Copy link
Author

honzajde commented Oct 15, 2022

I have found several links, this one looks most relevant:

microsoft/playwright#13878

It looks like it is possible

On my machine profiles are here: ~/.config/google-chrome/<Default | Profile 1 | Profile 2 | ...>
Profile of current window can be found via chrome:version as "Profile Path"

Futher, by reading this:
microsoft/playwright#13878 (comment)

It looks like:

Profiles can not be shared with other browsers! And they say that

  1. Playwright needs to run in it's own window
  2. Playwright can not connect to a running instance;) This was (is?) possible with puppeteer as far as I remember...
  3. Existing browser windows using that profile that we want to use with Playwright have to be closed.

So in summary launchPersistentContext should work under the above assumptions.

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

No branches or pull requests

2 participants