Open tlrobinson opened 8 years ago
PhantomJS
has a way to take screenshots natively. Other browsers like Chrome
or Firefox
does not have this natively. I'm pretty sure there's no easy way to do this (or maybe not at all).
@MLefebvreICO seems like Chrome does (https://developer.chrome.com/extensions/desktopCapture)
Any update on this issue? I am using ChromeHeadless and have been searching for almost half a day now for a way to take screenshot. Any pointers?
After 3 years, anything new on this?
Something like karma-puppeteer-launcher should do (see here).
Given that it is already doable and that this feature requires a very specific browser and a very specific browser launcher to work, it is best to be developed as a separate plugin. If you're interested in this feature I would suggest to use/contribute to karma-puppetteer-launcher or a similar plugin.
Thanks, I'll give it a try.
Just want to comment that this framework works well for me. https://github.com/prantlf/karma-failure-snapshots I am using karma + jasmine on an Angular project
I understand Karma is primarily designed for unit tests, however the ability to screenshot during a test would be very useful for visual regression testing (both automated and manual).
End-to-end frameworks like Protractor or raw WebDriver scripts generally require you handle building the frontend and spinning up a server. Karma already does almost exactly what I need for this use case, except the ability to take a screenshot.
It's currently possible via the PhantomJS launcher, but it would be great if more launchers supported it, especially in a cross-browser way.