reg-viz / storycap

A Storybook Addon, Save the screenshot image of your stories :camera: via puppeteer.
https://www.npmjs.com/package/storycap
MIT License
716 stars 88 forks source link

Support selenium driver #15

Open alexeybondarenko opened 6 years ago

alexeybondarenko commented 6 years ago

Visual regression testing can be also useful for cross-browser testing. It can be possible with this addon if add support of the selenium webdrivers. headless_chrome is good for the local testing (because it's simple to install and use), but it can be nice to be ready capture the screenshot in the different browsers. And selenium can help to do that.

wadackel commented 6 years ago

Hi @alexeybondarenko , Thank you for Issues :smile:

Unfortunately I am not familiar with Selenium WebDrivder ... However, I agree with Visual Regression Testing using various browsers :+1:

If this support is added, is it an image that switches Storybook's rendering and screenshot shooting engines?

Example:

$ storybook-chrome-screenshot --engine {selenium|puppeteer}
alexeybondarenko commented 6 years ago

@tsuyoshiwada that would be great! Probably, we can find a library - abstraction on top of these engines. If no, we have to create it 😄

wadackel commented 6 years ago

@alexeybondarenko Thanks :smiley: ! I would be happy if you can send me PR again if possible :pray:

alexeybondarenko commented 6 years ago

@tsuyoshiwada I will try to find the time for that :D

obartra commented 6 years ago

Is support for it being worked on? If not, do you have some thoughts as to how go about it?

I'm interested in this feature as well. I've a couple utility methods to simplify selenium screenshots for storybook (https://github.com/obartra/picturebook) but your add-on implementation looks like a better approach.

I wonder if we could leverage some of it to add cross browser support to storybook-chrome-screenshot