0

while executing below code using Chrome driver I have observed org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension error.

System.setProperty("webdriver.chrome.driver", "D:\\Sarika\\Web Driver\\chromedriver.exe");
ChromeOptions options=new ChromeOptions();
options.addArguments("start-maximized");
options.addArguments("no-sandbox");
options.addArguments("disable-extensions");         
options.addArguments("--js-flags=--expose-gc");  
options.addArguments("--enable-precise-memory-info"); 
options.addArguments("--disable-popup-blocking");
options.addArguments("--disable-default-apps");
options.addArguments("test-type=browser");
options.addArguments("disable-infobars");

driver  = new ChromeDriver(options);
driver.get("https://www.google.co.in/");
driver.findElement(By.xpath("//div[@id='sb_ifc0']"));
TakesScreenshot ts =((TakesScreenshot)driver);
File source = ts.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(source, new File("./Screenshots/google.png"));
driver.close(); 

I am using Chrome Version 61.0.3163.100 (Official Build) (32-bit)

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.