ChromeDriver,IEDriver,Firefox配置

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();

上一篇:Thrift RPC实战(一).初次体验Thrift


下一篇:第一篇、微信小程序_01计算器