News for hackers. Stuff that matters.
Re:Theheadless.dev – open source Puppeteer and Playwright kn... by gitgud on Wednesday August 19, 2020 @09:42AM (#24210258)
Anybody know of a framework which can record user sessions and output puppeteer commands? (basically mouse clicks -> code)

It would make writing end-2-end integration tests much easier...

Re:Theheadless.dev – open source Puppeteer and Playwright kn... by hlenke on Wednesday August 19, 2020 @09:44AM (#24210277)
Hey, here is a basic & open source recorder for Puppeteer: https://github.com/checkly/puppeteer-recorder from the same team (disclaimer I'm co-founder of Checkly)
Re:Theheadless.dev – open source Puppeteer and Playwright kn... by calderarrow on Wednesday August 19, 2020 @01:26PM (#24213108)
Try out the selenium IDE.[0] It's a browser extension which allows you to record your movements/actions in the browser, and then export a scaffold of the code to replicate the interactions. It could serve as a decent start point

[0] https://www.selenium.dev/selenium-ide/

Re:Theheadless.dev – open source Puppeteer and Playwright kn... by Dylanlacey on Wednesday August 19, 2020 @10:19PM (#24219226)
I work at Sauce Labs (inc. TestObject and Screener.io) and the Record-and-Playback tests are the ones that tend to be the most...

Not great. They're prone to timing problems and fragile selectors. They work well for rapidly recorded, rapidly changing sites (where you can throw them away) or very stable sites (where the DOM is basically fixed), but they rapidly become a hassle in the middle.

But they sure are easy. I'd suggest recording as a first pass, then going back and refactoring them to be a bit more stable; Change XPATH or structural CSS selectors to use classes and IDs, add waits and assert for page loads, etc.

Re:Theheadless.dev – open source Puppeteer and Playwright kn... by mathias on Wednesday August 19, 2020 @01:14PM (#24212921)
Re:Theheadless.dev – open source Puppeteer and Playwright kn... by johnmurch on Wednesday August 19, 2020 @11:57AM (#24211805)
Re:Theheadless.dev – open source Puppeteer and Playwright kn... by dpacmittal on Wednesday August 19, 2020 @11:44AM (#24211615)
There's a chrome extension for nightmarejs which does exactly this