-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Bug]: Playwright Does Not Use "New Headless" Locally When Using chromium Channel #34355
Comments
Do you take local screenshot on Windows and compare them with screenshot on Linux in Azure/TFS? Also can you share a repro where this happens? |
Everything in my version of TFS is Windows based. The agent versions are on 3.239.1, if that helps at all. I'm not sure how to share a repro of the issue since my version of TFS is on prem. |
In general, for consistent screenshots, run tests in the same environment where the baseline screenshots were generated (see the warning). Browser rendering is quite sensitive to the host environment, so in your case we'd recommend you generate screenshots on the same CI machine where you run the tests.
If you could share a minimal project with a test that produces different results and share two screenshots that you see locally and on CI, we could see if there is anything that can be done. Most likely it's just a difference in the browser rendering mentioned above, which is still an open issue. |
Thank you for pointing out the warning in the documentation, I must have glanced over that before. I didn't have an issue until I switched the channel to chromium so I wasn't expecting differences to show up like this. I'll try basing the screenshots from the same environment. I will also see about getting a working example that reproduces the issue. |
Version
1.49.1
Steps to reproduce
Set Playwright config to use Desktop Chrome with channel chromium, as shown in the example here: #33566
Set a baseline snapshot for visual comparison from the local machine.
Run the test in Azure/TFS.
Expected behavior
The visual comparison test should pass, expecting that both from the local and remote that the same "new" headless version was used to capture and test the screenshot.
Actual behavior
The test fails when run in Azure/TFS.
Local machine does not appear to use "new" headless version when using the chromium channel.
If I compare the local snapshot with how the headed browser looks, it is slightly different in that the element spacing is off.
If I compare the snapshot taken in Azure/TFS with how the headed browser looks, they are identical.
Additional context
I tried capturing screenshots using the headed browser locally and they still don't look correct compared to the screenshots captured in TFS, so I may not be 100% sure why the screenshots look different in TFS compared to local. This is only the case when I use the chromium channel. My visual comparison tests work fine if I do not use the chromium channel.
I always pull the latest from my repository and install playwright with its browser dependencies whenever my tests run in TFS.
Environment
The text was updated successfully, but these errors were encountered: