【发布时间】:2017-04-05 16:35:59
【问题描述】:
我尝试使用 Robot Framework RIDE 运行测试脚本
我得到了WebDriverException: Message: 'chromedriver' executable needs to be in PATH. 的例外情况
我也尝试使用 firefox,然后我收到错误为 WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
测试脚本如下:
*** Settings ***
Documentation CLM Registration Test Case
Library Selenium2Library
Library DatabaseLibrary
*** Variables ***
${MSISDN_NUMBER} 9300012067
@{QueryResult}
${Delay} 5s
*** Test Cases ***
Prepaid Retail Registration
Login to CLM
Change Language to English
Click on Register Kit
*** Keywords ***
Login to CLM
Open Browser http://172.20.24.74/clm-ui/#/login/ ff
Input Text id=username akurasa
Input Password id=password Srija210$
Click Button css=.btn.btn-primary
Change Language to English
Sleep ${Delay}
Wait Until Element Is Visible xpath=//*[@id='top-navbar']/ul[2]/li/a/span[2] 30s
Click Element xpath=//*[@id='top-navbar']/ul[2]/li/a/span[2]
Click Element xpath=//*[@id='top-navbar']//a[contains(text(),'English')]
Click on Register Kit
Sleep ${Delay}
Wait Until Element Is Visible //a[contains(text(),'Register Kit')] 30s
Click Element xpath=//a[contains(text(),'Register Kit')]
for chrome only 语句更改为
Open Browser http://172.20.24.74/clm-ui/#/login/ Chrome
请任何人帮忙。
谢谢 萨拉达
【问题讨论】:
-
错误信息一目了然,您需要下载“chromedirver”(适用于 Chrome)或“geckodriver”(适用于 firefox)并将可执行文件放在 PATH 变量中可用的位置。跨度>
-
嗨,我已将所有驱动程序保存到该位置 -
D:\Robot_WorkSpace\CLM\Drivers。我在 PATH 环境变量中将此路径指定为`D:\Robot_WorkSpace\CLM\Drivers`。仍然存在同样的问题 -
您好,我尝试了另一种方法,将所有驱动程序存储在测试套件所在的路径中。运行时,它打开了 chrome/ie 浏览器,但出现错误“chromedriver.exe 已停止工作”并强制完全需要单击关闭程序按钮。请帮帮我
-
请分享更多细节,如chromedriver版本和浏览器版本
-
webdriver.Chrome(executable_path=''),您可以在启动 chrome 时在此处指定完整路径,第二件事,有关“chromedriver.exe 已停止工作”的错误” 出现的原因有很多,其中一个常见的原因是“URL 的框架不正确”。你能重新检查你的网址吗
标签: robotframework