Created
February 13, 2015 12:39
-
-
Save karlosmid/f4a0f41aeb8d510deb9e to your computer and use it in GitHub Desktop.
How to embed screenshot in Cucumber report across various environments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After do |scenario| | |
if scenario.failed? | |
encoded_img = @browser.screenshot.base64 | |
embed("data:image/png;base64,#{encoded_img}",'image/png') | |
end | |
@browser.close | |
Cucumber.wants_to_quit = true if scenario.failed? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment