Live data from Hacker News

Playwright: Automate Chromium, WebKit and Firefox

github.com

71–80 of 149 posts

Re: Playwright: Automate Chromium, WebKit and Firefox

#71
post #53
post #39

Interesting tidbit: One of the main contributors of this project[0], was the core contributor (creator?) of Puppeteer[1], but then I guess left Google to join Microsoft and work on this[2][3]. [0] - https://github.com/aslushnikov [1] - https://github.com/puppeteer/puppeteer/ [2] - https://github.com/microsoft/playwright/graphs/contributors [3] - https://github.com/microsoft/playwright/graphs/contributors

I wonder what the story is there. Why wouldn't MS just have him continue to work on Puppeteer? They're both open source, so there's not much point in "owning" their own clone of it.

I'm exaggerating but Playwright vs Puppeteer is a bit like comparing Puppeteer with Selenium

Re: Playwright: Automate Chromium, WebKit and Firefox

#72
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.

Re: Playwright: Automate Chromium, WebKit and Firefox

#73

What do people thing of playwright vs cypress? I've been considering using playwright instead as it supports more browsers and I feel like it's easier to do production monitoring (by putting it in a aws lambda or using checkly) - Cypress: https://www.cypress.io - Playwright aws lambda: https://github.com/PauloGoncalvesBH/running-playwright-on-aw... - Checkly: https://www.checklyhq.com

There is also gauge/taiko https://taiko.dev/

Re: Playwright: Automate Chromium, WebKit and Firefox

#74
post #49

Does it support screencast - video recording of the browser with audio?

It supports video recording (without audio), screenshots, and post mortem recording which is called Tracing.

I recognise your name from playwright! Thanks for the product, I love it.

All of the above are uploaded automatically as Github artefact as part of auto-generated Github Action!

Re: Playwright: Automate Chromium, WebKit and Firefox

#75

Earlier quoted context omitted.

Perhaps Captcha?

Thanks for the suggestion. It is possible, but this degrades the experience for legitimate users. We prefer solving this without impacting/taxing normal users if possible.

Recaptcha v3 doesn’t prompt if it thinks you’re a real user.

Re: Playwright: Automate Chromium, WebKit and Firefox

#76

Earlier quoted context omitted.

Consider us one. :) We tried removing "async" -- thinking it would force sequential processing -- but it unexpectedly seemed to cause parallel processing of requests, which caused CUDA memory errors. Before removing "async", this is the weird behavior we observed: * Hacker blasts 50-100 requests. * Our ML model processes each request in normal time and sequentially. * But instead of returning individual responses imm…

What are the bots goals? Curious

To use premium settings without paying.

It appears less like malicious DDoS and more like pragmatic theft.

Re: Playwright: Automate Chromium, WebKit and Firefox

#77
post #69
post #61

Earlier quoted context omitted.

Why was Selenium off the menu?

Selenium is slow and based on webdriver. I think most consider it legacy at this point. Most new projects tend to use Playwright, Cypress, or Puppeteer for E2E tests. All three options are much more performant and reliable.

I've been out of this space for a while, but isn't WebDriver the only cross-browser spec for browser automation? The last I knew, the browser vendors were removing other automation hooks for security reasons and heavily influenced the WebDriver spec.

Re: Playwright: Automate Chromium, WebKit and Firefox

#79
post #18

What do people thing of playwright vs cypress? I've been considering using playwright instead as it supports more browsers and I feel like it's easier to do production monitoring (by putting it in a aws lambda or using checkly) - Cypress: https://www.cypress.io - Playwright aws lambda: https://github.com/PauloGoncalvesBH/running-playwright-on-aw... - Checkly: https://www.checklyhq.com

We see a strong adoption of Playwright. It’s the default we recommend to users now. We also support Puppeteer, but its development is lagging. Having said that, I would love to support Cypress if I had infinite time and focus. Side note: Selenium is not on the menu, even with its large install base. We are aiming for where the puck is going and it’s going to Playwright. Full disclaimer: I’m CTO at Checkly.

How about Python bindings? Selenium is the only decent option in that space so far, are we wrong?

Re: Playwright: Automate Chromium, WebKit and Firefox

#80

Earlier quoted context omitted.

It could be. I watch the FastAPI repos a lot and tones of people do not understand how async python works and put their models with sync code in an async context.

Consider us one. :) We tried removing "async" -- thinking it would force sequential processing -- but it unexpectedly seemed to cause parallel processing of requests, which caused CUDA memory errors. Before removing "async", this is the weird behavior we observed: * Hacker blasts 50-100 requests. * Our ML model processes each request in normal time and sequentially. * But instead of returning individual responses imm…

Any chance the entire thing can be offloaded to a task queue (Celery/etc)? This would decouple the HTTP request processing from the actual ML task.

The memory errors you're seeing could suggest that you may not actually be able to run multiple instances of the model, and even if you could it may not actually give you more performance than processing sequentially.

Seems like ultimately your current design can't gracefully handle too many concurrent requests, legitimate or malicious - this is a problem I recommend you address regardless of whether you manage to ban the malicious users.

Post reply on HN