标签:
Firefox版本过高,不兼容,启动会报错,所以可安装多个版本的Firefox
public class baidu {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.firefox.bin", "C:\\Program Files\\Mozilla Firefox\\firefox.exe");
WebDriver driver=new FirefoxDriver();
driver.get("https://www.baidu.com/");
String url=driver.getCurrentUrl();
System.out.println(url);
driver.close();
}
}
Selenium 设定firefox的启动路径(安装多个firefox适用)
标签:
原文地址:http://www.cnblogs.com/caimaomao/p/5741378.html