You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to the PW_TEST_CONNECT_WS_ENDPOINT environment variable it is possible to run tests in remote browser in docker container (as documented here: #26482 ).
It would be great to have the same option for npx playwright codegen . Is this technically possible?
Example
Have a docker container forwarding port 3000 and wayland display with npx playwright run-server --port 3000 --host 0.0.0.0 running. Below is an example compose.yaml, where playwright.Dockerfile basically is a [email protected] docker image with custom ca certificates:
from the host machine to record new tests. Ideally, the Playwright VSCode Extension would allow to set such an endpoint as well to allow using this feature directly from there.
Motivation
We are creating a PWA with heavy cross-site communication and are therefore very restrictive on allowed origins and the like. On some sites (cloud storage) changes need to be persisted for the duration of the test but need to be reset before the next run. To achieve this while staying as close as possible to production without messing with /etc/hosts and the likes our easiest approach was to emulate the setup in docker containers.
We have this setup up and running and can start writing tests now but obviously using playwrights build-in codegen would be super comfortable!
Thanks for considering!
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
Thanks to the
PW_TEST_CONNECT_WS_ENDPOINT
environment variable it is possible to run tests in remote browser in docker container (as documented here: #26482 ).It would be great to have the same option for
npx playwright codegen
. Is this technically possible?Example
Have a docker container forwarding port 3000 and wayland display with
npx playwright run-server --port 3000 --host 0.0.0.0
running. Below is an example compose.yaml, whereplaywright.Dockerfile
basically is a[email protected]
docker image with custom ca certificates:For headed mode to work we need to modify the chromium entry in
projects
array inplaywright.config.ts
toThe tests can then be run from the host machine by
The requested feature would allow to call
from the host machine to record new tests. Ideally, the Playwright VSCode Extension would allow to set such an endpoint as well to allow using this feature directly from there.
Motivation
We are creating a PWA with heavy cross-site communication and are therefore very restrictive on allowed origins and the like. On some sites (cloud storage) changes need to be persisted for the duration of the test but need to be reset before the next run. To achieve this while staying as close as possible to production without messing with
/etc/hosts
and the likes our easiest approach was to emulate the setup in docker containers.We have this setup up and running and can start writing tests now but obviously using playwrights build-in codegen would be super comfortable!
Thanks for considering!
The text was updated successfully, but these errors were encountered: