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

[Feature] A way to CDP using persistent contexts #13111

Closed
szmarczak opened this issue Mar 28, 2022 · 5 comments
Closed

[Feature] A way to CDP using persistent contexts #13111

szmarczak opened this issue Mar 28, 2022 · 5 comments

Comments

@szmarczak
Copy link
Contributor

https://playwright.dev/docs/api/class-browser#browser-new-browser-cdp-session

https://playwright.dev/docs/api/class-browsercontext#browser-context-browser

Returns the browser instance of the context. If it was launched as a persistent context null gets returned.

So persistentContext.browser().newBrowserCDPSession() cannot be used because .browser() returns null.

Would context.newContextCDPSession() make sense?

@rwoll
Copy link
Member

rwoll commented Mar 28, 2022

Added P3-collecting-feedback label to gauge interest in this feature.

Please elaborate on your use case(s) below!

@anxsec
Copy link
Contributor

anxsec commented Apr 7, 2022

Run into the same problem.

@szmarczak
Copy link
Contributor Author

@rwoll It's been almost 6 months. Is there any interest in this? I'd like to use Target.setAutoAttach for target interception, since Playwright doesn't support it yet.

@khanguy00
Copy link

khanguy00 commented Sep 27, 2022

I think launchPersistentContext should return browser instead of this:

return browser._defaultContext!;

This way, it should allow people to get both browser and BrowserContext.

@pavelfeldman
Copy link
Member

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

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

No branches or pull requests

5 participants