5 ms·
really curious about peoples experience with this compared to things like Cypress.
by keithnz 5y ago
really curious about peoples experience with this compared to things like Cypress.
- tnolet 5y agoThis 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.
- inglor 5y agoI 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)
- arjun27 5y agoWith the latest release, Playwright includes an integrated test runner: https://playwright.dev/docs/next/test-intro https://playwright.dev/docs/next/test-intro
- wdb 5y agoWell, 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); https://playwright.dev/docs/debug#playwright-trace-viewer); and contribute to that.
- Hawxy 5y ago> such as multi-domains aren't supported Thankfully this is being actively worked on: https://github.com/cypress-io/cypress/issues/944#issuecomment-853129902 https://github.com/cypress-io/cypress/issues/944#issuecommen...
- worldsayshi 5y agoI'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.
- wdb 5y agoGot less once I started using dom-testing-library :)
- arjun27 5y agoWere you able to use the DOM snapshots to debug why the selectors did not resolve? Would love to know more.
- worldsayshi 5y ago> 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.