Here is the code that I use to capture screenshots (Watir-Webdriver, Cucumber). I use remote Windows XP virtual machines for my test fields and have not encountered a problem using Firefox or Internet Explorer.
We found that when viewing a log with a built-in screenshot, it does not work in IE, so you need to use Firefox to view it. It is base64, so there is no logical reason for this.
After do |scenario| if scenario.failed? encoded_img = @browser.driver.screenshot_as(:base64) embed("data:image/png;base64,#{encoded_img}", 'image/png') end
source share