While opening Chrome browser from selenium error occuring -
browser opening not secure showing in header , 'disable extension' showing. after chrome.exe stopped working. chrome verison 57.0 , selenium jar file 3.0.1
public static void main(string[] args) throws interruptedexception { system.setproperty("webdriver.gecko.driver","e:\\software\\geckodriver-v0.14.0-win64\\geckodriver.exe"); //webdriver wd= new firefoxdriver(); system.setproperty("webdriver.chrome.driver","e:\\software\\chromedriver_win32_v2.9\\chromedriver.exe"); chromeoptions options = new chromeoptions(); options.addarguments("--disable-extensions"); webdriver wd= new chromedriver(); wd.get("http://automationpractice.com/index.php"); }
the first thing update chrome driver using automation. can 2.28 version , try these lines of code.
desiredcapabilities capabilities = new desiredcapabilities(); capabilities = desiredcapabilities.chrome(); chromeoptions options = new chromeoptions(); map<string, object> prefs = new hashmap<string, object>(); prefs.put("credentials_enable_service", false); prefs.put("profile.password_manager_enabled", false); options.setexperimentaloption("prefs", prefs); options.addarguments("--disable-extensions"); capabilities.setcapability(chromeoptions.capability, options); system.setproperty("webdriver.chrome.driver", chromepath); webdriver driver = new chromedriver(capabilities);
let me know if there issue.
Comments
Post a Comment