title: How to capture images and attach them to Cucumber Reports (Jenkins) using Selenium Hub, Node and Remote Webdriver?
body: <p>Currently I'm triggering my automation tests in the cloud using a Ubuntu instance. </p>
  
  <p>The Ubuntu instance has a Jenkins instance running and also Selenium Hub and Node. It seems the screenshot images dont get saved within the builds\3\cucumber-html-reports\embeddings on a ubuntu system however on a windows system this issue does not exist. </p>
  
  <p>I have currently added the below logic to capture and attach images to the Jenkins Cucumber reports however currently the images are not getting attached to the reports:</p>
  
  <pre><code>@After
  public void after(Scenario scenario) {
      if (scenario.isFailed()) {
          try {
              WebDriver augmentedDriver = new Augmenter().augment(getDriver());
              byte[] s = ((TakesScreenshot)augmentedDriver).getScreenshotAs(OutputType.BYTES);
              scenario.embed(s, "image/png");
  </code></pre>
  
  <p>Example Report (Generated in Jenkins), please note the images are getting saved and attached to the reports when running the tests locally. 
  <a href="https://i.stack.imgur.com/VA6OW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VA6OW.png" alt="enter image description here"></a></p>