Linux下用selenium打开网页报错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux下用selenium打开网页报错相关的知识,希望对你有一定的参考价值。
环境:Fedora11、Firefox、Python2.7.3、Selenium2.44.0
这是我的Python脚本:
from selenium import webdriver
browser=webdriver.Firefox()
browser.get(http://www.baidu.com)
执行脚本后会弹出浏览器,如下图所示:
点击“Detailes”会出现这样的错误提示:“
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
”
然后Python编译器下会这样报错:
Traceback (most recent call last):
File "test.py", line 3, in <module>
browser=webdriver.Firefox()
File "/usr/local/lib/python2.7/site-packages/selenium-2.9.0-py2.7.egg/selenium/webdriver/firefox/webdriver.py", line 47, in __init__
desired_capabilities=DesiredCapabilities.FIREFOX)
File "/usr/local/lib/python2.7/site-packages/selenium-2.9.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 60, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/site-packages/selenium-2.9.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 151, in execute
response = self.command_executor.execute(driver_command, params)
......后面还有很多错
求高手解答,万分感谢!
蓝鱼:非常强大的网页编辑器,同时还完善。支持语法高亮,项目管理,并配备了html和php手册。
的Websphere网页建设者
的Websphere主页制造商是IBM生产的WYSIWYG HTML编辑工具,用户无需了解HTML语法和复杂的CSS / DHTML知识,将能够创造一个美丽的页面。
以上是关于Linux下用selenium打开网页报错的主要内容,如果未能解决你的问题,请参考以下文章
python下用selenium的webdriver包如何在执行完点击下一页后没有获得下一页新打开页面的html源代码