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

Use Playwright #1731

Open
mvysny opened this issue Jan 30, 2024 · 4 comments
Open

Use Playwright #1731

mvysny opened this issue Jan 30, 2024 · 4 comments

Comments

@mvysny
Copy link
Member

mvysny commented Jan 30, 2024

Yes this is quite a tall order. However, Playwright simply works - it downloads the browser distribution, the appropriate driver for your OS, all this behind the scenes, automatically on first start, without any need for a Maven plugin. I don't have to do anything, and the test just works. I quite like that. Opposed to that, Selenium is always broken on my Linux box - always missing a driver or a browser, or the browser is not compatible with the driver, or the driver just fails for no apparent reason. I have to figure out where to download the browser and the appropriate driver, then how to set the paths to Selenium Driver to finally make Selenium work. Then this breaks upon next browser upgrade/OS upgrade/something changes. Selenium feels extremely fragile and very hard to set up, at least on a Linux box. I think it's time to ditch this broken piece of technology and replace it with something much more solid.

@Artur-
Copy link
Member

Artur- commented Jan 30, 2024

Selenium downloads and uses the correct webdriver automatically through its Selenium Manager since maybe a year or so. Does it not work on Linux?

@mvysny
Copy link
Member Author

mvysny commented Feb 1, 2024

Apparently not. Fails for Firefox installed via snap (the default in Ubuntu) with

WARNING: The geckodriver version (0.33.0) detected in PATH at /snap/bin/geckodriver might not be compatible with the detected firefox version (122.0); currently, geckodriver 0.34.0 is recommended for firefox 122.*, so it is advised to delete the driver in PATH and retry

No, I'm not going to delete the geckodriver that comes from the Firefox snap. Sure it might be outdated, but Selenium should download the right one.

With Chromium it's even worse: Chromium starts but sits there and does nothing:
image
After a while the test fails:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: DevToolsActivePort file doesn't exist 

Basically I'm unable to run Selenium on Ubuntu 23.10.

@TatuLund
Copy link
Contributor

TatuLund commented Feb 1, 2024

@mshabarov
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🅿️Parking lot - under consideration
Development

No branches or pull requests

4 participants