Fix launch_server, to be able to use persistent_context and user_data_dir#398
Fix launch_server, to be able to use persistent_context and user_data_dir#398pierorolando1 wants to merge 1 commit intodaijro:mainfrom
Conversation
|
How would you connect to the ws endpoint? So far it's an unresolved issue with playwright (only Chromium based ones due to reuse of context being only supported over cdp connection) |
|
I've been able to connect like |
|
Can you access the preexisting browser contexts? When passing user_data_dir to launch_server, it automatically opens up a new context/window, and I was wondering if I can access/reuse this one (since it's the one with passed/desired context) |
|
The bigger problem for me is that |
Ya but I'm using the camoufox pypi module only on the server-side. |
|
Any updates so far? I also thought why launch_server doesn't provide arguments persistent_context and user_data_dir. |
|
Does the PR really fixed it and able to use persistent profile ? or its just a stubs ? |
|
yes, PR fixed it and able to use persistent_context with user_data_dir. I checked it locally. |
Thanks I confirm that it is fixed also for me |
Issue #253
When attempting to use
persistent_contextanduser_data_dirparameters inlaunch_server():These parameters are completely ignored - they are not read, parsed, or taken into account by the implementation.
Solution
According to playwright-core/src/browserServerImpl.ts, the underlying implementation supports passing
_userDataDirfor persistent contexts.This PR adds support for these parameters in
launch_server()to enable persistent context functionality when launching browser servers.