3 ms·
I recently finished moving fr Python-selenium to Python-playwright. Though my outcomes might be different, it is such a significant improvement that I would str
by LordKeren 3y ago
I 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!