title: Screenshot is not working with chrome browser but same code is working fine with firefox
body: <p>CaptureScreenShot.java:</p>
  <pre><code>public class CaptureScreenshot {
      WebDriver driver;
            
            public static void takescreenshot(WebDriver driver,String Screenshotname) throws IOException
             {
                    TakesScreenshot takescreenshot=(TakesScreenshot)driver;
                    File source=takescreenshot.getScreenshotAs(OutputType.FILE);
                    FileUtils.copyFile(source, new File(&quot;./Screenshots/&quot;+Screenshotname+&quot;.png&quot;));
                    System.out.println(&quot;Screenshot Taken Successfully!!!!&quot;);
                   
             }
  </code></pre>
  <p>Main.java:</p>
  <pre><code>public class testLogin extends SuperTestNG {
      
  
  
  @BeforeClass
      public void precondition()
      {
          System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;D:/personal/chromedriver_win32/chromedriver.exe&quot;);
          driver=new ChromeDriver();
          driver.get(&quot;http://10.1.19.234:8002/&quot;);
          driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
          
      }
      @Test()
      public void login1()
      {
          
          Login login=new Login(driver);
          login.testLogin();
          //login.clkUsers();
          Assert.assertEquals(&quot;Index - testw&quot;, &quot;Index - test&quot;);
      }
      
      @AfterMethod
      public void failedCondi(ITestResult result) throws Exception
      {
          System.out.println(&quot;Testcase status is&quot;+ result.getStatus());
          System.out.println(&quot;result status is&quot;+ ITestResult.FAILURE);
          if(ITestResult.FAILURE==result.getStatus())
          {
              CaptureScreenshot.takescreenshot(driver, &quot;titlefail&quot;);
          }
          
      }
  
  }
  </code></pre>
  <p>This code is working fine with Firefox browser but same code is giving following error with Chrome browser.</p>
  <pre><code>Error: FAILED CONFIGURATION: @AfterMethod failedCondi([TestResult name=login1 status=FAILURE method=TestLogin.login1()[pri:0, instance:script.TestLogin@523884b2] output={null}])
  org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension
  from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
    (Session info: chrome=57.0.2987.110)
    (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
  </code></pre>