News for hackers. Stuff that matters.
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Sunday February 16, 2020 @11:07PM (#22345531)
Playwright is a new alternative to Selenium, and besides being cross-browser, is focused on performance, developer ergonomics and reliability (death to flakiness!). Might be worth checking out? https://github.com/microsoft/playwright.

Disclaimer: I work with the Playwright team at Microsoft.

Re:Ask HN: What automation tools have you used to replace mu... by rumanator on Monday February 17, 2020 @02:02AM (#22346070)
Hi thanks for mentioning your project. Are there any plans to use it for automated UI testing for desktop apps? Selenium supports it (more or less) with WinAppDriver, which is another project from Microsoft.

https://github.com/microsoft/WinAppDriver

Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @10:49AM (#22348484)
Desktop support is definitely on our long-term roadmap! We’re simply starting web, since it’s an area we think we can make big improvements to, before moving on to the broader developer landscape.

As we build out Playwright, we hope to learn a lot about how to make automation more reliable, ergonomic, and enjoyable for developers. Ideally, we could then apply those principles/learnings to desktop, mobile, etc. automation too. Stay tuned!

Re:Ask HN: What automation tools have you used to replace mu... by theshadowknows on Monday February 17, 2020 @05:53PM (#22351702)
Might check out Sikuli
Re:Ask HN: What automation tools have you used to replace mu... by 2rsf on Monday February 17, 2020 @03:22AM (#22346298)
Looks promising ! although most of my problems (but not all) were related to environment and not Selenium itself.

> setTimeout-free automation

How ? you still need an upper limit for operations

Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @10:41AM (#22348424)
Each of the page operations (e.g. click) automatically wait for the specified element to become visible before being performed. That way, your automation code is declarative about what you want to do, and to what element(s), and you can allow the Playwright framework to handle any “waits” on your behalf (without having to rely on time as a pseudo event).

To make the act of selecting elements more resilient to change, Playwright also supports a collection of “selector engines” that allow you to choose the best strategy for selecting elements (via CSS selector, xpath, text content). Additionally, you can author entirely custom selector engines, and compose them together with the built-in types. This is still somewhat experimental, but we think this can enable another level of robustness to test automation: https://github.com/microsoft/playwright/blob/master/docs/sel....

Finally, in addition to waiting for element visibility, Playwright allows you to wait for specific page events to occur (e.g. network request work made). This enables your code to leverage deterministic “signals”, not timeouts (which are the source of a lot of flakiness!). Overall, we want it to be possible to author automation that is entirely event-driven, and includes zero arbitrary timeouts.

Re:Ask HN: What automation tools have you used to replace mu... by mastah88 on Monday February 17, 2020 @02:48PM (#22350127)
What about smart selectors? First run uses defined selector but also saves othe attributes. If in next run element can be found by defined selector then those saved parameters are used to locate element.
Re:Ask HN: What automation tools have you used to replace mu... by ta345345345 on Monday February 17, 2020 @03:15AM (#22346274)
Keen to check it out; the flakiness of Webdriver/Selenium I often wonder is more pain than it brings. So many sites I see disabling tests based on it because they sometimes work/sometimes don't, the hours that get plowed into it.

Edit: Missed the Microsoft ref. Not so keen.

Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @11:00AM (#22348556)
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!

Re:Ask HN: What automation tools have you used to replace mu... by spikej on Thursday February 20, 2020 @12:01AM (#22372804)
Check out https://www.cypress.io Been super happy with it!
Re:Ask HN: What automation tools have you used to replace mu... by shostack on Monday February 17, 2020 @11:26AM (#22348752)
Can you attach it to an existing browser window/session that is already open? Ie. I navigate and authenticate to a site, run code, and it continues from there with what's on screen?
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @11:50AM (#22348908)
Playwright allows you to connect to existing browser instances, but it currently requires you to get the “debug URL” of the browser instance first: https://github.com/microsoft/playwright/blob/v0.11.1/docs/ap....

I’d love to hear a bit more about the scenario you have in mind, since that might help inform some improvements we can make. Thanks!

Re:Ask HN: What automation tools have you used to replace mu... by shostack on Monday February 17, 2020 @01:07PM (#22349354)
The issue I'm having with Selenium (well, Watir with Ruby) is booting up some automated scraping logic for a page that may be in my current session once I've done the whole authentication dance manually (so I don't have to focus on automating that piece initially).
Re:Ask HN: What automation tools have you used to replace mu... by xzel on Monday February 17, 2020 @01:06AM (#22345902)
Ah this looks great. I'm super happy I'm learning about this project. Do you guys have any plans of adding extensions ala puppeteer-extra?
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @10:56AM (#22348530)
As part of our goal to enable better developer ergonomics, we’re very keen to explore “better”/higher-level APIs and additional extensibility points. For example, we allow you to define custom “selector engines” (https://github.com/microsoft/playwright/blob/master/docs/sel...), which is just one example of the kinds of customizations we want to enable.

Out of curiosity: are there any specific extensions from puppeteer-extra that you’ve used and/or would be interested to see?

Re:Ask HN: What automation tools have you used to replace mu... by xzel on Monday February 17, 2020 @09:04PM (#22352807)
Looks great. The ones I use the most are probably: puppeteer-extra-plugin-block-resources puppeteer-extra-plugin-anonymize-ua puppeteer-extra-plugin-adblocker puppeteer-extra-plugin-stealth (this the most heavily)

Cheers!

Re:Ask HN: What automation tools have you used to replace mu... by sbergot on Monday February 17, 2020 @05:05AM (#22346619)
Thanks for the heads up! Selenium tests flakiness is definitely a big pain for us. I am also a big fan of the puppeteer api. We will check it out.
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @10:54AM (#22348519)
Great! Let us know if you end up having any questions/comments/feedback: https://github.com/microsoft/playwright.
Re:Ask HN: What automation tools have you used to replace mu... by jain_chirag04 on Monday February 17, 2020 @01:28PM (#22349466)
Just tried the examples on our site and it works really well! Amazing project!

PS: I remember interacting with you from the early days of code-push I think :)

Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @01:49PM (#22349625)
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.

Re:Ask HN: What automation tools have you used to replace mu... by ampdepolymerase on Monday February 17, 2020 @12:02AM (#22345716)
Any plans for a visual editor like Kantu?
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @11:56AM (#22348950)
Low/no-code authoring is definitely something we’re interested to explore. Once we’ve solidified the core Playwright library, we plan to build (and collaborate with the community on) tools that can simplify automation tasks even further, on top of a modern, reliable and performant core.

Are you currently using Kantu? If so, I’d love to hear more about your specific use cases, and which capabilities you’d be interested to see. Thanks!

Re:Ask HN: What automation tools have you used to replace mu... by prox on Monday February 17, 2020 @10:40AM (#22348415)
Love the project, just installed it and trying it out now, got some nice results right away.
Re:Ask HN: What automation tools have you used to replace mu... by lostintangent on Monday February 17, 2020 @10:44AM (#22348449)
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

Re:Ask HN: What automation tools have you used to replace mu... by jharohit on Monday February 17, 2020 @06:05AM (#22346826)
Plugging another alternative to the horrible Selenium made by two friends of mine! https://uilicious.com/
Re:Ask HN: What automation tools have you used to replace mu... by hugs on Monday February 17, 2020 @08:45AM (#22347622)
Just here to let you know the Selenium developers are human and read HN, too.
Re:Ask HN: What automation tools have you used to replace mu... by jharohit on Monday February 17, 2020 @10:34AM (#22348373)
Don’t like the tool, didn’t say anything about the Developers. Not the finest choice of words though I agree.
Re:Ask HN: What automation tools have you used to replace mu... by noeltock on Monday February 17, 2020 @09:05AM (#22347745)
Doesn't seem open source?
Re:Ask HN: What automation tools have you used to replace mu... by jharohit on Monday February 17, 2020 @10:30AM (#22348335)
It’s not.