Live data from Hacker News

Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

blog.checklyhq.com

11–20 of 31 posts

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#12
I'm really excited by what Playwright has been up to on the python side recently with the pytest-playwright package. Browser-testing a Django app can be as simple as:

  def test_homepage(live_server, page):
      page.goto(live_server.url)
      assert page.innerText('#splash-quote') == 'our splash-quote'
  
  $ pytest -k test_homepage --browser chromium --browser firefox --verbose
  tests/test_browser.py::test_homepage[chromium] PASSED                [ 50%]
  tests/test_browser.py::test_homepage[firefox] PASSED                 [100%]

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#14
Why are all the selenium extensions so janky? Selenium and Katolan recorder are infuriating to use when they work and they break so often that I might as well code my tests by hand instead of try and fail to use the recording tools again and again...

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#15
Take this benchmark as a grain of salt. Playwright > Puppeteer from technical point of view. Playwright is well maintained by some developer who started puppeteer and there are less bugs on playwright than on Puppeteer.

It may be faster but that depends on browser too right? Which browser version pinned to same? There are many other factors too.

Why playwright > Puppetter

1. Playwright supports cross browser properly. You don't usually see errors on firefox in playwright 2. Maintenance (Just watch recent commits, issues etc) 3. Less bugs on playwright

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#16
I wonder how much difference the scripting language would have made to these benchmarks if any. OP if you are up to it, I would suggest using Python, Go with Chromedp and also rod[1] next time for same tests.

[1]https://github.com/go-rod/rod

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#17

Take this benchmark as a grain of salt. Playwright > Puppeteer from technical point of view. Playwright is well maintained by some developer who started puppeteer and there are less bugs on playwright than on Puppeteer. It may be faster but that depends on browser too right? Which browser version pinned to same? There are many other factors too. Why playwright > Puppetter 1. Playwright supports cross browser properly…

The scope of the benchmark is narrower than that, as stated in the article. It is not our aim to talk features, community, reliability (etc.) in this one article - that rather sounds like a book, and a long one at that.

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#19
post #18

There's obviously a place for browser testing. But I'm still not convinced most of the huge effort that goes into it couldn't have been better spent building stronger unit and integration tests elsewhere in the tech stack.

As long as there are buttons to click, people will want robots to click the same buttons.

It is surprising, though, how much engineering is required to click a button.

Re: Benchmark: Puppeteer vs. Selenium vs. Playwright vs. WebDriverIO

#20

Interesting.. I've chatted with Tim and learned a lot of people run Puppeteer on Lambda.. there is an easier way (spoiler - I work on the open source project OpenFaaS) - https://www.openfaas.com/blog/puppeteer-scraping/ Hope it's of some use to folks who may be struggling to compile lambda-chrome or with local testing. I used Selenium a lot in a past life, so this post is interesting to see, but the UX and maintenanc…

This is certainly a good approach if you need that extra performance or plan on heavy use and that outweighs the extra ops. In my own experiments with Chrome and Puppeteer on Lambda, it has been rather slow as you also noticed.

With that said, if someone does want to use Lambda, it's easier than outlined in the article. Use one of the layers listed at https://github.com/shelfio/chrome-aws-lambda-layer and then `require('chrome-aws-lambda')` works fine, making it easy to throw something together even in the AWS console's own editor.

Post reply on HN