ChromeDriver:

下载ChromeDriver.exe,放入某个文件夹,如C:\Program Files (x86)\Google\Chrome\Application,把此路径加入path系统环境变量或者设置System.setProperty("webdriver.chrome.driver", "C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe"),即可WebDriver driver = new ChromeDriver();


IEDriver:

下载IEDriverServer.exe,放入某个文件夹,如C:\Program Files (x86)\Google\Chrome\Application,把此路径加入path系统环境变量或者设置System.setProperty("webdriver.ie.driver", "C:/Program Files (x86)/Google/Chrome/Application/IEDriverServer.exe"),即可

WebDriver driver=new InternetExplorerDriver();


Firefox:

不需下载Driver,如果火狐安装不在默认路径,需加入path或者setProperty

        System.setProperty("webdriver.firefox.bin", "D:/Program Files (x86)/Mozilla Firefox/firefox.exe");
        WebDriver driver = new FirefoxDriver();



相关文章:

  • 2022-02-21
  • 2021-11-21
  • 2021-09-26
  • 2021-04-10
  • 2021-06-01
  • 2021-06-16
  • 2022-02-09
  • 2022-12-23
猜你喜欢
  • 2022-01-21
  • 2021-11-17
  • 2021-06-11
  • 2021-11-26
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案