3 ms·
Interesting, what features are most impactful in making it more pleasant to work with? We picked Selenium because it seems much more widely used at least in th
by jonasnelle 3y ago
Interesting, what features are most impactful in making it more pleasant to work with?
We picked Selenium because it seems much more widely used at least in the Python world (selenium has about 10x more downloads on PyPI than playwright). My guess is that's at least partly because Playwright is more focused on the JS/TS ecosystem and testing.
- LordKeren 3y agoI recently finished moving fr Python-selenium to Python-playwright. Though my outcomes might be different, it is such a significant improvement that I would strongly, strongly recommend at least spending a couple days trying it out if you are familiar with selenium. To my team, selenium’s only advantage in the python ecosystem is that it is easier to hire people with experience. However, anyone familiar with selenium is likely to pick up playwright extremely quickly anyways Playwright does ship a pytest integration but it is not required Some highlights: 1. Better waiting — everything is auto-waited and auto-retried by default 2. Easy to install browsers — no need to get separate webdriver browsers. Just run “playwright install chromium” 3. Full, accurate typing 4. Trace viewing to step through a script execution 5. Async support 6. (Arguably) more pythonic syntax and easier to pick up/ train people I really enjoyed mastering selenium over the years, but I struggle to think of a use case for it outside of maintaining legacy script suites anymore. Playwright just does it better.
- jonasnelle 3y agoThat’s super helpful, thanks for explaining!
- jonasnelle 3y agoHave been digging into Playwright a bit - can you say more about the trace viewing to step through a script execution? Very curious!
- jasonjmcghee 3y agoWildly better developer experience. Playwright is also much less flakey and easier to work with than cypress, another alternative to selenium. Selenium is quite outdated, though still widely used. It's much older. I would look at downloads over time / rate of change, not total downloads. My hot take- don't hook yourselves to outdated tech. Don't take my word for it- go try out selenium, Cypress, and playwright and draw your own conclusions.
- hugs 3y agofwiw, the Selenium project is now old enough to go to college (19 years this month!); it's not ready to retire just yet. (Side-note: Google Chrome is 15 years old. Age is just a number.) Selenium is still learning from other projects and implementing new things. Specifically, check out the WebDriver BiDi project, adding a bidirectional protocol which was the core of what made Playwright and Puppeteer faster. Also, Selenium devs are working with the W3C to make this work for everyone. https://github.com/w3c/webdriver-bidi https://github.com/w3c/webdriver-bidi https://w3c.github.io/webdriver-bidi/ https://w3c.github.io/webdriver-bidi/ Google wrote a good explainer about WebDriver BiDi here: https://developer.chrome.com/articles/webdriver-bidi/ https://developer.chrome.com/articles/webdriver-bidi/