我可以使用以下Robot Framework测试打开浏览器:
Onboard The Customers
Open Browser https://xxxxxxxxxx/xx chrome
Chromedriver在我的家中,并且正确设置了PATH。
但是,现在我想在jenkins中运行该项目。所以,我将chromedriver复制到了JENKINS_HOME(/ var / lib / jenkins)。将PATH设置为包含此目录。
将RF测试更改为:
Onboard The Customers
Set Environment Variable webdriver.chrome.driver /var/lib/jenkins/chromedriver
Open Browser https://xxxxxxxxxx/xx chrome
我无法解决这个错误消息:
Onboard The Customers
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
Test Start Time: 20170504 12:22:42.512
Test End Time: 20170504 12:22:42.541
| FAIL |
WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
答案 0 :(得分:0)
我在jenkins工作中设置的PATH出错了。所以,一旦我纠正了测试现在正在运行。