What does HackerNews think of playwright?

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Language: TypeScript

#4 in Chrome
#6 in Electron
#10 in Firefox
#27 in JavaScript
#2 in Testing
Good news! Microsoft makes a Webkit browser that's up to date with Safari's webkit version.

https://github.com/microsoft/playwright

For simple scraping where the content is fairly static, or when performance is critical, I will use linkedom to process pages.

https://github.com/WebReflection/linkedom

When the content is complex or involves clicking, Playwright is probably the best tool for the job.

https://github.com/microsoft/playwright

In the world of SPA (single page applications), headless browser API is super helpful, playwright[1] and puppeteer[2] are very good choices.

[1] https://github.com/microsoft/playwright

[2] https://github.com/puppeteer/puppeteer

While I do agree, then you don't have to run Selenium tests on your PC, but let it be done by e.g ci/cd

Also depends how many pages do you want to test with Selenium - if you want to test e.g 5 pages, then it'll be fast enough I guess.

There are a few tricks/configurations that make Selenium significantly faster - https://stackoverflow.com/a/57720610

A lot of is also on how do you write your "testing infrastructure" - maybe you could reuse engine/browser instance? execute tests parallelly?

There's also alternative to Selenium by Microsoft: https://github.com/microsoft/playwright

AFAIK it's way more reliable than Selenium (false errors)

__________

Overall you can still start application inside tests with different startup, without Selenium and send http requests, so you'll have end-to-end tests done fast.

Do check out https://github.com/microsoft/playwright - Node.js library to automate Chromium, Firefox and WebKit with a single API
Cypress uses bluebird for their promise implementation which are A+ spec. [1]

Also (nearly) every command in Cypress is a promise which allows you to make them then-able. [2]

I don't agree with using Cucumber for anything. The way most teams implement Cucumber makes it such a pain to write a test. I do like the suggestion of puppeteer tho. If you haven't heard of playwright [3] I'd look into that. From the same creator as puppeteer but was hired to work on playwright full time. They have the advantage of being to test on gecko, chromium, and webkit browsers which is really nice because IME anything Apple becomes such a pain to setup to properly test.

[1] https://docs.cypress.io/api/utilities/promise.html#Syntax

[2] https://docs.cypress.io/api/commands/then.html#Yields

[3] https://github.com/microsoft/playwright

I've found playwright more useful: https://github.com/microsoft/playwright

It's an alternative to Cypress and from what I remember, it has a much better API.

Playwright looks promising if you’re OK with a narrower range of browsers: https://github.com/microsoft/playwright
Hey! I definitely remember you :) It’s always satisfying to run into the same folks across different projects, over the course of multiple years.

I’m glad to hear the examples worked out of the box! We’ve been iterating on the docs and API quite a bit (based on feedback), so don’t hesitate to let us know if/how they can be improved: https://github.com/microsoft/playwright.

Out of curiosity: why does the fact that Playwright is a Microsoft-sponsored OSS project discourage your interest?

The team is working very hard to be open/transparent/available (https://github.com/microsoft/playwright), and we’re very excited to build a better automation stack with the help of the community. I only ask since I’d love to hear any feedback for how we could improve the way we run/position the project. Thanks!

Awesome! Please don’t hesitate to let us know how we can improve. We want to make web automation not only more reliable, but also more enjoyable. So we’re keen to hear how we can continue to push that goal forward :)

https://github.com/microsoft/playwright