Live data from Hacker News

Playwright: Automate Chromium, WebKit and Firefox

github.com

141–149 of 149 posts

Re: Playwright: Automate Chromium, WebKit and Firefox

#141

Earlier quoted context omitted.

A proxy like Cloudflare or a custom proxy that stores data? Are there proxy examples you could point us to? Thanks for your help.

https://www.haproxy.com/blog/four-examples-of-haproxy-rate-l...

Thank you for this.

Re: Playwright: Automate Chromium, WebKit and Firefox

#142
post #109

What is the … operator for? test.use({ ...devices['iPhone 13 Pro'], locale: 'en-US', geolocation: { longitude: 12.492507, latitude: 41.889938 }, permissions: ['geolocation'], })

That is the JavaScript spread operator. It takes all of the elements of an object or an array and adds them to another. In this case, the code posted is merging the iphone 13 pro device settings object into an object literal

Most cool, thx

Re: Playwright: Automate Chromium, WebKit and Firefox

#143
post #135

Earlier quoted context omitted.

> 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?

GP manages puppeteer team at Google

Re: Playwright: Automate Chromium, WebKit and Firefox

#144

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…

> This differs from the Playwright team's approach of shipping patched browser binaries.

Can you expand on that?

Re: Playwright: Automate Chromium, WebKit and Firefox

#145

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…

> This differs from the Playwright team's approach of shipping patched browser binaries. Can you expand on that?

"Each version of Playwright needs specific versions of browser binaries to operate." [0]

They patch and compile browser binaries so they have the functionality Playwright needs.

Their build of Chromium is one release ahead of what's out but it looks like one could maintain a library of older Playwright browser binaries to test with. They probably have an older Firefox 91 binary that's feature-equivalent to the current Firefox ESR. Their WebKit builds won't ever be exactly the same as Apple Safari.

[0] https://playwright.dev/docs/browsers

Re: Playwright: Automate Chromium, WebKit and Firefox

#146
post #3

Anyone have experience with Playwright compared to Selenium? I have a fairly large test suite and Selenium produces constant false positive errors, typically due to various timeouts that seem fundamentally unsolvable when running it from .NET. It's just very finicky. I don't know if it's Selenium specifically or some problem with the .NET binding, but I figure Microsoft must have better .NET integration so it will at…

I have had similar issues with selenium via other languages too - it is generally pretty flaky. E.g. saying a button or some other element doesn't exist when it clearly does. With great care and effort you can make your tests reliable (especially if you are happy to allow a "best of 3" type test strategy to allow for 1 flake and 2 passes) though. Prodigious use of the wait (i.e. stdlib polling) primitives seems to gi…

I think the issue here is Selenium or Playwright they depend on Selectors which depends on UI. And when there is a change it breaks the tests. We are working on something to generate you an adapting code (Cypress first) and let you know when there needs to be a change in your test script.

We have an AI model that understands the page structure as humans do. So we can do this "Click on 'Sign in' on the 'Login' page".

We have a no-code tool as well which adapts to the changes. But we want to generate the code for people who want to keep things internally.

Would love to discuss it more: m@preflight.com Our website: https://preflight.com

Re: Playwright: Automate Chromium, WebKit and Firefox

#147
post #3

Anyone have experience with Playwright compared to Selenium? I have a fairly large test suite and Selenium produces constant false positive errors, typically due to various timeouts that seem fundamentally unsolvable when running it from .NET. It's just very finicky. I don't know if it's Selenium specifically or some problem with the .NET binding, but I figure Microsoft must have better .NET integration so it will at…

I tried selenium then playwright for a .Net project, selenium wasn't easy to work with. Playwright was good but for some reason which I don't recall exactly (could have been because it had to redownload chromium everytime we deployed). I ended up switching to puppeteer and I ended up very happy with it.

You can now generate puppeteer code from Google Chrome Recorder. You should check it out. But still it might be flaky.

No-code is the best in my opinion :D https://preflight.com

We have done all the ground work. Like: - Concurrency - Adapt to the changes. Our selectors are like this: "Click on 'Login' button in the 'Sign in' form" - Update the tests with an HTML/Video player etc

Re: Playwright: Automate Chromium, WebKit and Firefox

#148

Are there any products for QA folks that reduce the workload? I find most things are still done manually…

We are also in the space. Manual testing is definitely time consuming. You can automate your manual testing with https://preflight.com

Would love to help any of your testing needs

Re: Playwright: Automate Chromium, WebKit and Firefox

#149

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…

Browser automation will occur by executing events in the DOM or by calling properties of the page/window. It’s all JavaScript designed for user interaction executed by a bot. The one event that cannot be automated is cursor movement/position. Put a check into your event handlers that check that the cursor is actually over the event target.

You are right every testing solutions out there push UIEvents to the page rather than clicking with an actual mouse. That's why puppeteer, selenium etc are scraping tools not testing tools
Post reply on HN