mattheworiordan / capybara-screenshot

Automatically save screen shots when a Capybara scenario fails
MIT License
1.02k stars 168 forks source link

Add ability to manually save screenshots with custom prefixes #256

Open mtancoigne opened 5 years ago

mtancoigne commented 5 years ago

I like to make custom screenshots for demonstration purpose, so this PR updates screenshot_and_save_page and screenshot_and_open_image with two additional parameters: prefix and html

This is useful to differentiate screenshots from failures.

mtancoigne commented 5 years ago

No problem, I'll try to fix this this week.

mtancoigne commented 5 years ago

Hi !

For the arguments, do you prefer options or keyword arguments ?

For html, this was a mistake on my side in the README, it should have been false. I set this option so one can save only image screenshots without breaking the way the library works today.

mattheworiordan commented 4 years ago

For the arguments, do you prefer options or keyword arguments ?

Well options because we still support older versions of Ruby, for now.

mtancoigne commented 4 years ago

Hi! I think i'm ready with the changes.