Live data from Hacker News

Playwright: Automate Chromium, WebKit and Firefox

github.com

131–140 of 149 posts

Re: Playwright: Automate Chromium, WebKit and Firefox

#131

The only thing I wish we had was remote browser access - so I could run my tests on a VM (like within a docker image) and use a browser on the host. We use TestCafe at work for this purpose. I personally hate TestCafe as it's is an absurd unfocused mess of a browser remote, but it lets me control my browser by navigating to a URL which no other browser remote system does.

You can do that with X11, set the display of your desktop inside the docker container and playwright's browser will appear on your desktop.

Re: Playwright: Automate Chromium, WebKit and Firefox

#132
post #102

Earlier quoted context omitted.

My main issue with Cypress was the fact that it required a shift in mental model, i.e. queuing commands rather than executing them, thenables that aren't actually promises, running as client side JS as opposed to in a controller script. There were a ton of sharp edges and required a lot of education to adopt. Meanwhile Playwright's API is just promises. Everybody knows how to compose promises. The Cypress approach do…

The irony is that the Cypress model is extremely similar to the Selenium Version 1 model. We abandoned that approach in Selenium V2 (WebDriver). Time is a flat circle.

This. Similarly how cypress does clicking with JavaScript which leads to weird bugs rather than with the debugger - similarly to old versions of selenium

Re: Playwright: Automate Chromium, WebKit and Firefox

#133

Benefits of Playwright over Puppeteer - official support for languages outside of JavaScript, and official codegen/record support. Great!

Also testing on safari/iphone is easy. It also has built-in snapshot testing. I just wish it was integrated with S3 as git LFS is not good

Re: Playwright: Automate Chromium, WebKit and Firefox

#134

Off-topic, but our freemium website is under attack by headless browsers. The freemium service provides access to compute-heavy machine learning models running on GPUs. Hackers blast 50-100 requests in the same second, which clog the servers and block legitimate users. We reported IPs to AWS and use Cloudflare "Super Bot Fight Mode" to thwart attacks, but the hackers still break through. We don't require accounts, bu…

429

Re: Playwright: Automate Chromium, WebKit and Firefox

#135

Earlier quoted context omitted.

I manage the team at Google that currently owns the Puppeteer project. The previous team that developed Puppeteer indeed moved to Microsoft and have since started Playwright. While it is true that staffing is tight (isn't it always), the number of open issues does not tell the full story. The team has been busy with addressing technical debt that we inherited (testing, architecture, migrating to Typescript, etc) as w…

> The team has been busy with addressing technical debt that we inherited [...] migrating to Typescript Wow, not writing stuff in TypeScript is now considered technical debt? I knew people were already rushing to rewrite everything in TypeScript if they could, but didn't knew we'd come this far along the hype-cycle already.

Perhaps because Typescript is a Microsoft baby?

Re: Playwright: Automate Chromium, WebKit and Firefox

#136

Earlier quoted context omitted.

They try very hard to stop you trying, though; Microsoft Teams has removed the “continue without the Teams app” button entirely on Firefox, even though I'm fairly sure it still works fine in Firefox.

I'm assuming you're not on macOS, right? Even though Firefox supports H.264, it's not really consistent outside of macOS because Firefox doesn't want to deal with patent hassles. This is true of Slack as well, some developers would actually support if Firefox has actually have decent support, but it's inconsistent outside macOS, where it can rely on Apple's good integration. P.S. OpeH264 doesn't help mainly because i…

You get the same message from macOS Firefox.

Re: Playwright: Automate Chromium, WebKit and Firefox

#137

Earlier quoted context omitted.

I manage the team at Google that currently owns the Puppeteer project. The previous team that developed Puppeteer indeed moved to Microsoft and have since started Playwright. While it is true that staffing is tight (isn't it always), the number of open issues does not tell the full story. The team has been busy with addressing technical debt that we inherited (testing, architecture, migrating to Typescript, etc) as w…

> The team has been busy with addressing technical debt that we inherited [...] migrating to Typescript Wow, not writing stuff in TypeScript is now considered technical debt? I knew people were already rushing to rewrite everything in TypeScript if they could, but didn't knew we'd come this far along the hype-cycle already.

Yes definitely. I've worked at two companies in three years spanning 250,000 employees and both companies consider writing JavaScript deprecated in favor of typescript.

Re: Playwright: Automate Chromium, WebKit and Firefox

#138

Earlier quoted context omitted.

I work at Google, but this is based on stuff I knew before I worked at Google, which I heard from a coworker. I haven't checked on the project since joining. The Puppeteer TL (the guy linked in the grandparent comment) apparently had ambitions to make Puppeteer work cross browser like Playwright does now. However, the Puppeteer project was heavily deprioritized and the TL would basically never be able to achieve thei…

I manage the team at Google that currently owns the Puppeteer project. The previous team that developed Puppeteer indeed moved to Microsoft and have since started Playwright. While it is true that staffing is tight (isn't it always), the number of open issues does not tell the full story. The team has been busy with addressing technical debt that we inherited (testing, architecture, migrating to Typescript, etc) as w…

I used Puppeteer on a project recently to generate some really big and complex PDFs that would have been a massive pain to do any other way, so thanks for your work, and I'm very happy to hear that the project isn't dead.

Re: Playwright: Automate Chromium, WebKit and Firefox

#139
There is also this Github Discussions thread on how it compares with things like Cypress, which is a E2E testing tool used by lots of people on the frontend web. TLDR: Playwright can achieve nearly all the things cypress can & more due to it being a fully scriptable browser - https://github.com/microsoft/playwright/discussions/11201 - https://cathalmacdonnacha.com/cypress-vs-playwright-which-is... - https://alisterbscott.com/2021/10/27/five-reasons-why-playwr...

Re: Playwright: Automate Chromium, WebKit and Firefox

#140

Earlier quoted context omitted.

I work at Google, but this is based on stuff I knew before I worked at Google, which I heard from a coworker. I haven't checked on the project since joining. The Puppeteer TL (the guy linked in the grandparent comment) apparently had ambitions to make Puppeteer work cross browser like Playwright does now. However, the Puppeteer project was heavily deprioritized and the TL would basically never be able to achieve thei…

I manage the team at Google that currently owns the Puppeteer project. The previous team that developed Puppeteer indeed moved to Microsoft and have since started Playwright. While it is true that staffing is tight (isn't it always), the number of open issues does not tell the full story. The team has been busy with addressing technical debt that we inherited (testing, architecture, migrating to Typescript, etc) as w…

Glad to hear that. Puppeteer still has a number of compelling things over Playwright (like not shipping patched binaries) so I hope competition in this space can continue to happen :)
Post reply on HN