zoukankan      html  css  js  c++  java
  • 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>


    作者:高级测试开发网
    博客地址:https://seniortesting.club
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    体育场馆预订系统版本1.0
    需求分析
    系统界面主地图
    详细设计
    概要设计
    测试用例正式发布
    第二次全体会议顺利召开5.30
    第一次小组会议(5.24)
    SDk编程基础
    单词canutillos祖母绿canutillos英语
  • 原文地址:https://www.cnblogs.com/seniortestingdev/p/2320132.html
Copyright © 2011-2022 走看看