selenium的那些事--运行报错

1,需要加上3个jar包;

2,报错信息:

Please add the directory containing ''firefox.exe'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3c:\blah\firefox.exe
selenium的jira提交bug中心的报告:http://jira.openqa.org/browse/SEL-737
解决方案:http://stackoverflow.com/questions/1344026/how-to-explicitly-specify-a-path-to-firefox-for-selenium
 
这个是selenium的一个bug,最新版本的虽然需要将你需要测试的浏览器加入path中,但是却不检查。
 
So, I'm guessing you should be able to launch Google Chrome using "*googlechrome" instead of "*chrome".
Google Chrome is not the one which invented the term "chrome", actually ; it meansplenty of things, like Chrome Mozilla or User Interface Chrome
 
 

Chances are this problem is caused by an already-running instance of the Selenium server. The new instance needs to listen on the same port number, but can't, because the port is already in use.

Let's say your Selenium server is configured to start on port 4444. Determine if the port is in use using the 'netstat' command:

On Windows: netstat -an | find "4444"

Expect to see output like this:

  TCP    0.0.0.0:4444           0.0.0.0:0              LISTENING
  TCP    [::]:4444              [::]:0                 LISTENING

On Linux, use: netstat -anp | grep 4444

(No Linux box to hand, so can't show example output!)

If you see any output, you need to kill the process that's listening on the port that Selenium wants to use. On Windows, use netstat -anb to find the process name (it'll be listed after the line specifying the port number). Kill it using the Task Manager. On Linux, the process PID and name will be listed by the command above - kill it using kill -9 <PID>                                                                                                                                                                                                                                                                                                                                                                                       本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/archive/2012/01/12/2320132.html,如需转载请自行联系原作者。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值