News for hackers. Stuff that matters.
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by wraptile on Sunday September 20, 2020 @03:34AM (#24532497)
As soon as python bindings came out I made a `promt-toolkit` based shell[1] for playwright and it has been such a time saver for prototyping!

    $ ptplaywright
    > goto('https://news.ycombinator.com')
    # click on first comments link
    > click('.subtext>a:last-of-type')
    # type in text in comment box
    > type('textarea', 'hello world')
I was about to refactor it to a whole package and submit it to pypi if anyone is interesting in this sort of behaviour.

https://github.com/Granitosaurus/bin/blob/master/ptplaywrigh...

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by no_wizard on Saturday September 19, 2020 @02:34PM (#24529519)
I love playwright, especially since you get three browser engines (Webkit, Chromium and Gecko) under one unified API.

I am little disappointed they don’t have a testing library built on top of it, so I’m constantly either trying to re-invent the wheel or I end up using libraries I don’t like.

Sam issue I had with puppeteer. I think first party testing integration would be such a huge win with this.

I otherwise have nothing but awesome things to say about the playwright project, it really is such a great improvement over selenium and I think it’s now got a more ergonomic API than puppeteer

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by arjun27 on Saturday September 19, 2020 @03:56PM (#24529966)
Thanks for the feedback! I'm on the Playwright team.

We are building playwright-runner[1] to solve this problem. We are dogfooding the project internally, and a few weeks away from opening it up to early adopters.

[1] https://github.com/microsoft/playwright-runner

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by twsted on Monday September 21, 2020 @11:07AM (#24544307)
It does not support Drag & drop, is it right?

I think the support is missing in Playwright.

Are there any plans about this?

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by spankalee on Saturday September 19, 2020 @08:45PM (#24531232)
You should try out WebTestRunner: https://www.npmjs.com/package/@web/test-runner

It's a very, _very_ fast test runner that supports Playwright, Puppeteer, Selenium, BrowserStack and Sauce launchers.

We're using it for the new versions of lit-html and LitElement and the speed of re-running only effected tests on all three engines is amazing - it's nearly instant.

Abstracting away the browser launcher from just Playwright or Puppeteer means that your test infra still runs against IE11 or specific versions of, say, Safari if you need to.

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by wdb on Saturday September 19, 2020 @04:01PM (#24529999)
I quite enjoying using testing-library's playwright library, see: https://www.npmjs.com/package/playwright-testing-library and www.testing-library.com
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by no_wizard on Saturday September 19, 2020 @05:02PM (#24530289)
I didn’t see this listed on the official testing library page. Is it maintained by them?
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by wdb on Saturday September 19, 2020 @11:20PM (#24531678)
No, but it’s a fork of the puppeteer version which is part of testing library. As playwright is quite similar to the puppeteer library with small changes, it’s quite well maintained imho. Enjoying using it
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by niteshade on Saturday September 19, 2020 @03:40PM (#24529901)
I've had a brief but successful experience with QAWolf (https://www.qawolf.com/), which is built on Playwright (last I checked)
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by itsbits on Saturday September 19, 2020 @04:00PM (#24529991)
Beauty about Playwright (or puppeteer) is API itself is much complete & good devx to start using for browser testing. All you need is jest kind of wrapper.
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by Dylanlacey on Sunday September 20, 2020 @09:18PM (#24538869)
Just curious, why do you prefer a first-party testing integration; Is it to save on harness maintenance or do you not like any of the stand-alone testing libraries, or something else? I guess I don't quite follow what you mean by "re-invent the wheel".
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by nchudleigh on Saturday September 19, 2020 @03:03PM (#24529700)
have found using the jest preset pretty good, a little awkward getting my code injected in some cases though
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by holler on Saturday September 19, 2020 @03:54PM (#24529962)
same, using mocha and getting by, but would be amazing if there was a straightforward test layer built for it
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by umaar on Saturday September 19, 2020 @06:28PM (#24530734)
Playwright has been growing on me and it'll feature heavily in a video course I'm making for browser automation.

I'm keeping the codebase open on GitHub: https://github.com/umaar/learn-browser-testing/ so anyone who wants to follow along can do so for free.

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by hudixt on Saturday September 19, 2020 @06:37PM (#24530770)
We're also to building SAAS produt which is very similiar[1].

Things we are supporting - No-code test creation. Both playwright-cli and QAwolf supports it. - Much more control over elements. We're using native chrome extension to achieve it. Integrated ChaiJS on top of it. - Automated screenshot capturing, video + all debug info (console, network, DOM) when test fails.

We're looking for early beta users. If you're interested in trying it out + pizza send along your way, please fill this form https://bit.ly/2FU2Vc4.

P.S.- We're planning to start beta testing in couple of days.

[1] https://crusher.dev - Currently unfinished landing page.

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by defied on Sunday September 20, 2020 @08:40AM (#24533670)
We are running a SaaS platform [1] that allows you to connect your Playwright/Puppeteer to our grid of browsers. It’s built for parallel testing.

[1] https://headlesstesting.com

Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by matlin on Saturday September 19, 2020 @02:31PM (#24529498)
I'm not sure this improved much on existing solution like Taiko (https://taiko.dev/) which seems better than Playwright in a number of ways
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by wdb on Saturday September 19, 2020 @04:03PM (#24530007)
Because it also supports Webkit?
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by nsonha on Sunday September 20, 2020 @03:14AM (#24532436)
What does it mean to have a test runner for it? Could you not just use it with jest?
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by frabcus on Saturday September 19, 2020 @04:34PM (#24530145)
How does Playwright compare to Cypress?
Re:Playwright CLI – Open/inspect/emulate pages, generate scr... by arjun27 on Saturday September 19, 2020 @04:59PM (#24530278)
In short: support for WebKit (to test Safari), out-of-process automation (not constrained by scope of in-page JavaScript, for example, to test multiple pages/frames/domains), support for non-JS language bindings. For a more comprehensive list, check out "Why Playwright?"[1].

[1] https://playwright.dev/#version=v1.4.1&path=docs%2Fwhy-playw...