Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just spent half an hour wrestling with Selenium for Python and that API has NOT aged well.

    content = driver.find_element(By.CSS_SELECTOR, "p.content")
In Playwright Python:

    content = page.locator("p.content")
Playwright is just nicer to use. Selenium feels very Java-ish.


Yeah, not only that, but that’s the NEWER Selenium Python API. The older style was actually (imo) easier to grapple with, discover, etc. The whole thing has felt like it’s either written by people that don’t work with Python very often, or that it’s too married to the idea of being a close port of an API targeted at…yeah…Java.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: