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
Does the upstream have similar features? playwright-go is just a community-driven client for playwright. For feature requests, please refer to other officially supported clients first. Nodejs / Java / .Net / Python
Upstream doesn't have such feature, but implementing it in playwright-go might be easier due to the golang ecosystem.
Is your feature request related to a problem? Please describe.
When doing development with playwright-go and testing screenshot difference between CI (usually Linux) and local environment (usually Windows and MacOS). Solution to this is to setup a remote browser solution, but this create additional complexity. It is usually assumed that if things render in one OS, they will render close enough on any other OS.
Describe the solution you'd like
Automate the creation of a browser in a docker container locally and proxy all communication to enable local and CI tests to have the same result. I do have the code to do exactly that using testcontainer-go and goproxy, but before starting a PR, knowing if there is interest and how to shape it would be best.
Additional context
So how it work:
Create a http proxy on a random port using Go standard http server and goproxy
Wait for service to start
Create a container that will idle, but can run playwright node service and will have access to the proxy port
Exec node and serve browser using launchServer using a set of prefixed port to listen on and with the proper proxy setup (note that testcontainer-go does not allow HostAccessPort during the startup of the container, but they are only accessible during Exec).
Wait for the websocket port to start answering request
Use pw.Browser.Connect appropriately.
Overall it is maybe around 100 lines of code, but there is a lot of quirks to know about to get this working. It would be better if this is included in playwright-go directly.
Benefit, 100% pixels match between CI and local as they run in exactly the same environment.
The text was updated successfully, but these errors were encountered:
I guess the Dockerfile and resulting image would be something that can be shared across language (There is just one requirement is that the version of playwright installed in the image as to match the one of the playwright-*), but the helper that does glue together playwright, testcontainer and a proxy logic will be per language I would think.
What do you think of one new repository for the image and one per language that implement the glue? Do you have any suggestion for the name? I think I can create a repository for the image that will be automatically kept up to date with github action and the go implementation (python is not my forte) and link them here.
Does the upstream have similar features?
playwright-go
is just a community-driven client for playwright. For feature requests, please refer to other officially supported clients first. Nodejs / Java / .Net / PythonUpstream doesn't have such feature, but implementing it in playwright-go might be easier due to the golang ecosystem.
Is your feature request related to a problem? Please describe.
When doing development with playwright-go and testing screenshot difference between CI (usually Linux) and local environment (usually Windows and MacOS). Solution to this is to setup a remote browser solution, but this create additional complexity. It is usually assumed that if things render in one OS, they will render close enough on any other OS.
Describe the solution you'd like
Automate the creation of a browser in a docker container locally and proxy all communication to enable local and CI tests to have the same result. I do have the code to do exactly that using testcontainer-go and goproxy, but before starting a PR, knowing if there is interest and how to shape it would be best.
Additional context
So how it work:
Overall it is maybe around 100 lines of code, but there is a lot of quirks to know about to get this working. It would be better if this is included in playwright-go directly.
Benefit, 100% pixels match between CI and local as they run in exactly the same environment.
The text was updated successfully, but these errors were encountered: