{"id":7761,"date":"2015-10-22T23:56:42","date_gmt":"2015-10-22T23:56:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/10\/22\/watir-webdriver-black-screenshots-open-source-projects-watir-watir-webdriver\/"},"modified":"2015-10-22T23:56:42","modified_gmt":"2015-10-22T23:56:42","slug":"watir-webdriver-black-screenshots-open-source-projects-watir-watir-webdriver","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/10\/22\/watir-webdriver-black-screenshots-open-source-projects-watir-watir-webdriver\/","title":{"rendered":"watir-webdriver black screenshots-open source projects watir\/watir-webdriver"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/78b8855846f0ad24c680199d5361c3ca?s=128&amp;d=identicon&amp;r=PG\" \/> <strong>adam reed<\/strong><\/p>\n<p>Here&#8217;s the code I&#8217;m using to capture screenshots (Watir-Webdriver, Cucumber). I use remote Windows XP VMs for my test boxes, and have not encountered the issue using Firefox or Internet Explorer.<\/p>\n<p>We did find that when you view the log with the embedded screenshot, it does not seem to work in IE &#8211; so you have to use Firefox for viewing. It&#8217;s base64, so there doesn&#8217;t seem to be a logical reason for this.<\/p>\n<pre><code>After do |scenario|\n   if scenario.failed?\n      encoded_img = @browser.driver.screenshot_as(:base64)\n      embed(\"data:image\/png;base64,#{encoded_img}\", 'image\/png') \n   end #\nend\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>adam reed Here&#8217;s the code I&#8217;m using to capture screenshots (Watir-Webdriver, Cucumber). I use remote Windows XP VMs for my test boxes, and have not encountered the issue using Firefox or Internet Explorer. We did find that when you view the log with the embedded screenshot, it does not seem to work in IE &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7761","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7761"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7761\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}