我正在尝试在RIDE上运行这个简单的测试,但是如果不给我任何具体细节,我无法弄清楚它是否失败:
乘坐日志
command: pybot.bat --argumentfile c:\users\user\appdata\local\temp\RIDEe2en9t.d\argfile.txt --listener C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:49555:False C:\Python27\Scripts\test\Login\login_suite.robot
========================================================================================================================================================================
Login Suite
========================================================================================================================================================================
login_user | FAIL |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/assets/displayhelpservlet.css" media="all"/>
<link href="/assets/favicon.ico" rel="icon" type="image/x-icon" />
<script src="/assets/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="/assets/displayhelpservlet.js" type="text/javascript"></script>
<script type="text/javascript">
var json = Object.freeze('{"consoleLink":"/wd/hub","type":"Standalone","version":"3.11.0","class":"org.openqa.grid.web.servlet.DisplayHelpServlet$DisplayHelpServletConfig"}');
</script>
</head>
<body>
<div id="content">
<div id="help-heading">
<h1><span id="logo"></span></h1>
[ Message content over the limit has been removed. ]
</span>
</p>
<p>
Happy Testing!
</p>
</div>
<div>
<footer id="help-footer">
Selenium is made possible through the efforts of our open source community, contributions from
these <a href="https://github.com/SeleniumHQ/selenium/blob/master/AUTHORS">people</a>, and our
<a href="http://www.seleniumhq.org/sponsors/">sponsors</a>.
</footer>
</div>
</div>
</body>
</html>
启动Selenium服务器(standalone-3.11.0) Python版本2.7 环境路径设置为Python27 / Scripts
这是测试代码:
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
login_user
SeleniumLibrary.Open Browser Google.com googlechrome
Maximize Browser Window
Title Should Be Google
Chrome的webdriver也设置在Scripts文件夹中,但我也尝试过使用Firefox并获得相同的结果。
答案 0 :(得分:-1)
编辑:
所以我尝试过这段代码
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
login_user
SeleniumLibrary.Open Browser https://google.com googlechrome
Maximize Browser Window
Title Should Be Google
如果你有
您唯一需要做的就是下载chromedriver。 https://chromedriver.storage.googleapis.com/index.html?path=2.38/
下载后,将chromedriver放入文件夹并将其添加到您的路径中。
解压缩chromedriver后我的方式
Ubuntu的:
sudo mv chromedriver /usr/local/bin/
sudo chown root:root /usr/local/bin/chromedriver
视窗:
在此示例中为C:\ drivers \ chromedriver