quarkiverse / quarkus-playwright

Playwright enables reliable end-to-end testing for modern web apps
https://playwright.dev/
Apache License 2.0
6 stars 2 forks source link

Run on non-Ubuntu linux distros? #61

Open edeandrea opened 4 months ago

edeandrea commented 4 months ago

It seems that for Linux, Playwright only works on Ubuntu distros (see https://github.com/microsoft/playwright/issues/29559 & https://github.com/microsoft/playwright/issues/19458).

It seems there is somewhat of a workaround to run the Playwright server in Docker (https://github.com/microsoft/playwright/issues/26482).

Is there a way to get this to work with the extension? Maybe introducing a dev service rather than assuming that playwright will run on the host machine?

maxsonaraujo commented 4 months ago

Note: It is not a good practice, but it works in Playwright. The best practice is to go to the official repository, download the same version, and compile it on your distribution.

However, there is something that some people do to run using different versions of libraries. I did it and, so far, I haven't had any compatibility problems. Basically, you need to create symbolic links to your libraries.

First, you run playwright install to see which dependencies you need.

image

Something like this will appear, then just run for the first item on the line:

find /usr/lib64/ -name "libpcre.so*"

The result may look like this:

image

Then you just need to create the symbolic link:

sudo ln -s /usr/lib64/libpcre.so.1 /usr/lib64/libpcre.so.3

Do this for each dependency and, in the end, run playwright install again.

Another, easier way is to use Distrobox. It works in a container and is integrated with your folders and graphic server (Wayland or X11). You will use it as a Debian subsystem integrated with your machine. For more information, visit Distrobox.

edeandrea commented 4 months ago

Thank you for the info @maxsonaraujo . There are times though that we don't have control over the server that we are running on. That I think is the opportunity something like a dev service could play here.

A container that runs beside the app at test time, rather than on the host machine itself.

melloware commented 4 weeks ago

@all-contributors add @edeandrea for idea

allcontributors[bot] commented 4 weeks ago

@melloware

I've put up a pull request to add @edeandrea! :tada:

melloware commented 4 weeks ago

@all-contributors add @maxsonaraujo for idea

allcontributors[bot] commented 4 weeks ago

@melloware

I've put up a pull request to add @maxsonaraujo! :tada: