Robotframe+Selenium2Library打开浏览器时出现WebDriverException解决办法?

这里为打开chrome浏览器时报错,完整错误信息为:

command: pybot.bat --argumentfile c:userszpappdatalocal empRIDE5xr031.dargfile.txt --listener D:Softwarepython2_7_11libsite-packages obotidecontrib estrunnerTestRunnerAgent.py:54038:False D:Softwarepython2_7_11appcasewebtest.robot

=====================================================================================================================================

Webtest                             

=====================================================================================================================================

openBaidu

| FAIL |

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

-------------------------------------------------------------------------------------------------------------------------------------

Webtest                                                | FAIL |

1 critical test, 0 passed, 1 failed

1 test total, 0 passed, 1 failed

=====================================================================================================================================

Output:  c:userszpappdatalocal empRIDE5xr031.doutput.xml

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open

Log:     c:userszpappdatalocal empRIDE5xr031.dlog.html

Report:  c:userszpappdatalocal empRIDE5xr031.d eport.html

unexpected error: Exception AttributeError: "'Service' object has no attribute 'process'" in > ignored

test finished 20160627 11:17:14

解决办法:

根据上面的提示,实际已经给出了解决办法:

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

实际这里已经给出了解决办法,但是这个地址是下载不了chrome驱动的,这里给出一个可用地址:
http://www.xdowns.com/soft/38/63/2015/Soft_136971.html

下载chrome驱动,然后放置于python根目录下,就可以了。当然,我的python根目录已经写入了PATH变量中。不管chrome的驱动放在哪里,它的路径需要写入系统PATH变量。

对应的,如果打开IE360等浏览器出现这样的问题,再百度上找到对应的浏览器驱动,然后下载保存到python目录下就可以了。



我的回答