selenium webdriver 的环境搭建时注意事项

selenium webdriver 在 eclipse中的配置,网络上应该很方便搜索到,这里只记搭建过程中容易出现的一些问题

1.  selenium-java与selenium-sever-standalone 要用同一个版本,导入不同版本时容易出现找不到一些包的问题。

2. 注意firefox与selenium 版本的兼容,曾经遇到过启动了firefox,但是因为超时无法连接的错误。 目前我个人用的是firefox 19与 selenium-2.45.0 没问题。 网上查到的结果是 selenium-2.45.0 兼容firefox 36

3. 项目中需要从Build path -> linked source 导入selenium-java文件夹下的lib文件及selenium-java-2.45.0.jar,selenium-java-2.45.0-srcs.jar包;并将selenium-java-2.45.0.jar 和selenium-server-standalone-2.45.0.jar 包从build  path -> configure build path 导入到reference libraries中. 结构图如下

原文地址:https://www.cnblogs.com/yuanchunli/p/5163807.html