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,如需转载请自行联系原作者。

目录
相关文章
|
3月前
|
Web App开发 Python
Python使用selenium的Chrome下载文件报错解决
Python使用selenium的Chrome下载文件报错解决
46 0
|
JavaScript
Selenium常见报错问题(2)- 解决和分析StaleElementReferenceException异常
Selenium常见报错问题(2)- 解决和分析StaleElementReferenceException异常
1386 0
Selenium常见报错问题(2)- 解决和分析StaleElementReferenceException异常
|
8月前
selenium运行常见的报错问题
selenium运行常见的报错问题
77 0
|
11月前
|
Web App开发 JavaScript 前端开发
Selenium使用中报错:We\'re sorry but hr-frontend-v2 doesn\'t work properly without JavaScript enabled
Selenium使用中报错:We\'re sorry but hr-frontend-v2 doesn\'t work properly without JavaScript enabled. Please enable it to continue 这个错误提示表明目标网页要求启用JavaScript才能正常工作,而默认情况下,Selenium WebDriver是启用JavaScript的。如果遇到此错误,请按照以下步骤尝试解决问题
304 0
Selenium使用中报错:We\'re sorry but hr-frontend-v2 doesn\'t work properly without JavaScript enabled
|
API Android开发 Python
python +selenium识别不来click事件,出现报错
python +selenium识别不来click事件,出现报错
189 0
|
Web App开发 数据采集 数据可视化
解决selenium可视化爬虫报错以及安装chromedriver系列踩坑问题
今天首次使用selenium爬虫,需要下载chrome浏览器,以及对应的驱动: 1.下载chrome浏览器 点我下载 2.安装chromedriver驱动 点我下载 查看对应的版本方法: 通过 桌面 ,属性,查看文件位置 我的浏览器安装地址是C:\Program Files\Google\Chrome\Application 选择对应版本下载即可! 这里32位也可以用,不需要下载64位的 驱动解压到桌面后,将chromedriver.exe拖到对应的python目录中 我的目录路径为 C:\Users
342 0
解决selenium可视化爬虫报错以及安装chromedriver系列踩坑问题
|
Web App开发
error:selenium操作Firefox报错socket.error: [Errno 10054]
error:selenium操作Firefox报错socket.error: [Errno 10054]
error:selenium操作Firefox报错socket.error: [Errno 10054]
Selenium常见报错问题(3)- 解决和分析NoSuchElementException
Selenium常见报错问题(3)- 解决和分析NoSuchElementException
278 0
Selenium常见报错问题(3)- 解决和分析NoSuchElementException
|
Web App开发 JavaScript
Selenium常见报错问题(1)- 先来认识下selenium常见异常类
Selenium常见报错问题(1)- 先来认识下selenium常见异常类
634 0
|
Web App开发
error:selenium操作Firefox报错socket.error: [Errno 10054]
error:selenium操作Firefox报错socket.error: [Errno 10054]
104 0

热门文章

最新文章