News for hackers. Stuff that matters.
Re:Playwright for .NET is now stable by keithnz on Thursday June 10, 2021 @06:37AM (#27459116)
really curious about peoples experience with this compared to things like Cypress.
Re:Playwright for .NET is now stable by worldsayshi on Thursday June 10, 2021 @07:11AM (#27459326)
I've had some issues with Cypress selectors randomly failing to find matching elements, even though they are clearly present. Like if I run the same script 10 times it goes through ~7 times. I wanted to try Playwright for another application to avoid such issues.

And then I was very surprised to get almost the exact same issues with Playwright. Running against a different application with different test cases.

Has anyone else had issues like this with React applications? It's very annoying to not be able to write repeatable tests.

Re:Playwright for .NET is now stable by arjun27 on Thursday June 10, 2021 @08:04AM (#27459662)
Were you able to use the DOM snapshots to debug why the selectors did not resolve? Would love to know more.
Re:Playwright for .NET is now stable by worldsayshi on Thursday June 10, 2021 @10:26AM (#27461156)
> DOM snapshots

I should definitely try that the next time I'm working on this issue. Maybe I can get some kind of small example as well if possible. But replicating the problematic conditions is probably hard.

Re:Playwright for .NET is now stable by wdb on Thursday June 10, 2021 @07:51AM (#27459570)
Got less once I started using dom-testing-library :)
Re:Playwright for .NET is now stable by wdb on Thursday June 10, 2021 @07:05AM (#27459286)
Well, Cypress is going to use playwright for their Webkit integration.

Cypress is more limited compared to Playwright such as multi-domains aren't supported, multiple tabs, or popup windows. For my tests that require that I am using Playwright and for the rest I am currently using Cypress. But I do think the test writing experience is better with Cypress :)

I am considering to move to Playwright for everything now with the new Trace Viewer (https://playwright.dev/docs/debug#playwright-trace-viewer); and contribute to that.

Re:Playwright for .NET is now stable by Hawxy on Thursday June 10, 2021 @09:49AM (#27460727)
> such as multi-domains aren't supported

Thankfully this is being actively worked on: https://github.com/cypress-io/cypress/issues/944#issuecommen...

Re:Playwright for .NET is now stable by tnolet on Thursday June 10, 2021 @06:50AM (#27459198)
This question does come up quite a lot. One thing the remember is that Cypress is "batteries included" testing framework, where Playwright is essentially just the browser automation part of it.

I know the Playwright team is "moving up the stack" and adding many specific testing features, but it's not at the same level (yet?) as Cypress.

Re:Playwright for .NET is now stable by inglor on Thursday June 10, 2021 @08:42AM (#27459977)
I think you're thinking of Puppeteer? Playwright has stuff like automatically waiting for elements, selecting by text etc all built in - with modern JavaScript/TypeScript, none of the weird chaining syntax and debugger.

There are also tools that give you pretty much any feature Cypress has on top of Playwright.

(Not saying which is better - only that they're both sort of the same slot)

Re:Playwright for .NET is now stable by arjun27 on Thursday June 10, 2021 @10:06AM (#27460939)
With the latest release, Playwright includes an integrated test runner: https://playwright.dev/docs/next/test-intro