selenium版本兼容

2.1 selenium2 (selenium+webdriver)安装配置:JDK + eclipse + Firefox

1.jdk以及eclipse的具体安装详见 

 http://www.cnblogs.com/ericazy/p/6082194.html

安装1.7 jdk即可 

 

2.selenium 旧版本安装:

selenium安装最新版时,会要求1.8的jdk。 

比如普通1.7的jdk 。可以安装2.多的selenium 。

在eclipse中导入webdriver:

2.1 访问http://www.seleniumhq.org/download 。选择 ,并选择对应版本进行下载

2.2下载得到的zip 放到自己需要的目录中进行解压缩。

2.3在eclipse中 创建 JavaProject之后,右击 properties->  java Bulid Path -> libraries -> Add external Jars 。导入zip解压后根目录下的两个jar文件 +lib目录下的全部jar文件。

 

 

3.Firefox 旧版本安装:

旧版本安装原因:

Firefox不能安装太新的版本,不然会和selenium不能兼容。运行会有报错。比如提示:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055

 

安装:

盘古开天以来Firefox的所有版本网址:http://ftp.mozilla.org/pub/firefox/releases/

1.1访问网址后 http://ftp.mozilla.org/pub/firefox/releases/ 。找到想要的版本。比如版本38.0.1

1.2 在点击38.0.1后,进入的网址 http://ftp.mozilla.org/pub/firefox/releases/38.0.1/ 中,选择 win32-EME-free

1.3 在点击win32-EME-free 后,进入的网址http://ftp.mozilla.org/pub/firefox/releases/38.0.1/win32-EME-free/ 中,搜索  zh-CN。即中文版。点击下载后安装即可。