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

[Question] (Pixels different win/linux) Run Windows type Browser instance on Linux eg #10120

Closed
ghost opened this issue Nov 8, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 8, 2021

It turned out that browsers under Linux and Windows have pixel deviations (because of CSS) and have slightly different optical results (which are only noticeable in direct per pixel screenshot comparison between windows and Linux results, there are few pixels shifted). The goal was that the screenshot deviation on GUI-tests between "Linux" and Windows is zero. Literally.

Is it somehow possible to start a Windows instance of a playwright browser via wine (in this case chrome), for example? I need this to compare changes within my team, which are windows users. (The most use windows, some Linux - i do)

I don't care about the performance, the main thing is that it works - and I can test under Linux whether the view under Windows has changed when i have maybe made "bad" changes.

Did someone have had this kind of issue and found a solution?

Here is a example. The purple pixels are showing that there is something different. There are only some different (in most cases). But in our app some things are actually way too different! (Image 2)
grafik

grafik

I would be happy to talk about such topics in general. I can imagine that there are many, who have these problems. I've read a lot about how to solve pro-active such problems. It seems to have something to do with CSS (em.), but it would be important for me to test what the view looks like under Windows anyways - with Linux.Without cross-testing i wouldn't have known this behaviour actually. To be able to do this within only one operating system, would be really useful. Doing this vice versa under Windows could be nice too.

@ghost ghost changed the title [Question] Run Windows type Browser instance on Linux [Question] (Pixels different win/linux) Run Windows type Browser instance on Linux eg Nov 8, 2021
@mxschmitt
Copy link
Member

mxschmitt commented Nov 8, 2021

This is a common problem, since rendering and paining in browsers happens in WebKit on the platforms on entire different layers, so its often a bit different on a per pixel basis. Usually you solve it by splitting your tests up into normal tests and visual regression tests. These VRT tests you then run inside Docker (see here) to ensure you'll always get the same outcome. This will then work across all the operating systems (Linux, macOS, Windows) and produces the same result.

We're working on enhancing the story around this problem to bring a better DX to the users. So I'd probably merge it into #8161.

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

No branches or pull requests

2 participants