1、火狐、谷歌和IE浏览器引擎都要重新下载selenium官网引擎,并设置路径才可以支持selenium3

而狐火用自己的引擎不用设置路径既可以支持selenium2也支持selenium3,谷歌和IE就不行

package Testpakage;

import org.openqa.selenium.*;
import org.openqa.selenium.WebDriver.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxDriver.*;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.safari.SafariDriver;

public class Mytest {
public static void main(String[] args) {

System.setProperty("webdriver.gecko.driver", "C:\\Users\\Administrator\\Downloads\\geckodriver-v0.8.0-win32\\geckodriver.exe");
WebDriver driver=new FirefoxDriver();

// System.setProperty("webdriver.ie.driver", "C:\\Program Files\\Internet Explorer\\IEDriverServer.exe");
// WebDriver driver=new InternetExplorerDriver();
//
// System.setProperty("webdriver.chrome.driver", "C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe");
// WebDriver driver=new ChromeDriver();

driver.get("https://www.baidu.com/");
driver.quit();
}
}

最新文章

  1. git clone出现的error: The requested URL returned error: 401 Unauthorized
  2. httphandler和httpmodule的区别
  3. Google Web Designer – 创建引人入胜的 HTML5 网站
  4. WebSphere试用过期问题处理
  5. 采用Unity快速开发高质量游戏的若干优化建议
  6. ntpdate server时出错原因及解决
  7. bzoj1029
  8. ArrayList与Vector、HashMap与HashTable
  9. c++ 中关于int,unsigned int , short的关系与应用
  10. 修复ubuntu播放wmv等视频没有声音问题
  11. CentOS 7 安装Apache 2.4.39
  12. 100Mbps和100Mb/s有什么不同
  13. 虚幻开放日2017ppt
  14. easyUi 的DataGrid的绑定
  15. tensorflow中 tf.add_to_collection、 tf.get_collection 和 tf.add_n函数
  16. 虚拟机之openVZ简单基础
  17. backtype.storm.generated.InvalidTopologyException:null问题的解决
  18. L166
  19. php sapi 产生core 文件
  20. eetcode 之String to Integer (atoi)(28)

热门文章

  1. Windows系统Stunnel客户端的配置
  2. AnjularJs的增删改查(单页网站)
  3. jq分页异步刷新 ,全局刷新问题
  4. 获取assemblies信息in .net core
  5. 怎样使用nat和桥接方式解决虚拟机联网问题
  6. 迭代器和for-of循环 顺便带一下Es5中的.map遍历
  7. 使用bootstrap-table简化CRUD
  8. Java 集合系列05之 LinkedList详细介绍(源码解析)和使用示例
  9. 笔记 (note)
  10. iOS开发 传感器(加速计、摇一摇、计步器)