Lurker News
For my travel site side hustle (beatthatflight.com.au/), I find and publish cheap flights for Australians. Sounds simple, but even if say, someone gave me the flights each day, there's posting the, sometimes to deals sites, as well as then editing it and posting it on my site, and out to social media, and then to specific mailing lists on mailchimp, depending on the source city of the deal, or type of post.

A LOT of that becomes tedious. Mailchimp can auto post to FB/twitter/instagram etc, but even converting the blog post into mailchimp emails gets tiring, as you need to choose a feature photo, the specific mailing list etc.
I'm a selenium guy, so have built some scripts to minimise some of it, but the rush each time of finding a deal still pains me when I think of the tedium ahead of publishing it.
Ideally, my goal would be to submit [to][from][when] to a script and the whole process would be automatic. I can see that selenium could do it, but my goodness, it'd be slow and potentially flaky all via the web UI for those sites.
I'd love suggestions, examples of automation you've done, and tools used?

Comments (229) 59 threads

Show all comments

Showing thread 4 of 59

lostintangent10 replies#
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.

ampdepolymerase1 reply#
Any plans for a visual editor like Kantu?
lostintangent#
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!

xzel1 reply#
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?
lostintangent1 reply#
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?

xzel#
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!

rumanator2 replies#
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

lostintangent#
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!

theshadowknows#
Might check out Sikuli
ta3453453452 replies#
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.

lostintangent#
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!

2rsf1 reply#
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

lostintangent1 reply#
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.

mastah88#
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.
sbergot1 reply#
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.
jharohit2 replies#
Plugging another alternative to the horrible Selenium made by two friends of mine! https://uilicious.com/
hugs1 reply#
Just here to let you know the Selenium developers are human and read HN, too.
jharohit#
Don’t like the tool, didn’t say anything about the Developers. Not the finest choice of words though I agree.
noeltock1 reply#
Doesn't seem open source?
jharohit#
It’s not.
prox1 reply#
Love the project, just installed it and trying it out now, got some nice results right away.
lostintangent#
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

shostack1 reply#
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?
lostintangent1 reply#
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!

Continue this thread — 1 more reply

Continue this thread — 1 more reply