Automation 机器人框架可以';在路径变量中找不到chromedriver
我想使用Chrome进行机器人框架的自动化测试。以下是我的设置:Automation 机器人框架可以';在路径变量中找不到chromedriver,automation,selenium-chromedriver,robotframework,Automation,Selenium Chromedriver,Robotframework,我想使用Chrome进行机器人框架的自动化测试。以下是我的设置: *User variables:* name: webdriver.chrome.driver value: C:\chromedriver_win32\chromedriver.exe name: PATH values: ......;C:\chromedriver_win32\chromedriver.exe 我的代码: *** Settings *** Library BuiltIn Library Seleni
*User variables:*
name: webdriver.chrome.driver
value: C:\chromedriver_win32\chromedriver.exe
name: PATH
values: ......;C:\chromedriver_win32\chromedriver.exe
我的代码:
*** Settings ***
Library BuiltIn
Library Selenium2Library
Library SikuliLibrary
Library OperatingSystem
*** Variables ***
${HOST} = VM
${URL} = http://VM.com
${BROWSER} = Chrome
*** Test Cases ***
Begin Web Test
Open Browser ${URL} ${BROWSER}
maximize browser window
执行以下命令后:pybot test.robot:
==============================================================================
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No brows
er is open
Test Case FException
AttributeError: "'Service' object has no attribute 'process'" in <bound method
Service.__del__ of <selenium.webdriver.chrome.service.Service object at 0x000000
0003670278>> ignored
Test Case | FAIL |
Setup failed:
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Plea
se see https://sites.google.com/a/chromium.org/chromedriver/home
------------------------------------------------------------------------------
==============================================================================
[警告]失败时无法运行关键字“捕获页面屏幕截图”:无浏览
急诊室开门
测试用例异常
AttributeError:“服务”对象在忽略中没有属性“进程”
测试用例|失败|
安装程序失败:
WebDriverException:消息:“chromedriver”可执行文件需要位于路径中。恳求
塞西https://sites.google.com/a/chromium.org/chromedriver/home
------------------------------------------------------------------------------
这里怎么了
谢谢“chromedriver的可执行文件需要在路径中”意味着chromedriver的位置需要在路径中。在您的情况下,路径需要是“…;C:\chromedriver\u win32”。路径包含文件夹,而不是可执行文件。从其官方网站下载Chromedriver.exe,提取.exe文件并将此.exe文件复制到Python安装的脚本文件夹中,例如C:\Python36\scripts 在此之后,在环境变量中添加此脚本路径,如下所示: 现在执行您的测试用例