Note – Selenium version 3.10 onwards – ChromeDriver(cap) is deprecated, need to use only ChromeOptionsįor older versions of selenium chromePrefs = new HashMap() String downloadFilepath = "C:\\Users\\uname\\sel" The above specified path is for Mac OS, if you are using windows, then you can change the path accordingly tProperty("","C:\\Users\\uname\\sel\\chromedriver.exe") tCapability(CapabilityType.ACCEPT_SSL_CERTS, true) ĭriver.findElement(By.linkText("32 bit Windows IE")).click() įile will be downloaded under sel folder. Options.addArguments("-disable-extensions") //to disable browser extension popup tExperimentalOption("prefs", chromePrefs) String downloadFilepath = "/Users/uname/sel/" ĬhromePrefs.put("fault_content_settings.popups", 0) ĬhromePrefs.put("fault_directory", downloadFilepath) ĬhromeOptions options = new ChromeOptions() We will use ChromeOptions to set browser preferences ĭownload the Chrome driver with respect to your browser version from Save in a specified folder on hard disk.
0 Comments
Leave a Reply. |