我使用RF调用谷歌浏览器 使用jybot的运行方式 可以成功打开浏览器  但是使用pybot的方式就无法打开浏览器 提示  FAIL : No browser is open
我的case脚本

*** Settings ***
Library           Selenium2Library
*** Test Cases ***
open
    Open Browser    http://www.baidu.com    chrome
    Close Browser

报错提示

Starting test: Demo.Selenium Demo.Selenium001.open
20180503 15:31:15.528 :  INFO : Opening browser 'chrome' to base url 'http://www.baidu.com'
20180503 15:31:16.051 : DEBUG : POST http://127.0.0.1:61849/session {"sessionId": null, "desiredCapabilities": {"platform": "ANY", "browserName": "chrome", "version": "", "javascriptEnabled": true, "chromeOptions": {"args": [], "extensions": []}}}
20180503 15:31:16.258 : DEBUG : DELETE http://127.0.0.1:61849/session/None {"sessionId": null}
20180503 15:31:16.583 :  FAIL : No browser is open
20180503 15:31:16.584 : DEBUG :
Traceback (most recent call last):
  File "<string>", line 2, in capture_page_screenshot
  File "D:\RobotFramework_study\ride_64\PortablePython2.7.5.1\App\lib\site-packages\robotframework_selenium2library-1.7.4-py2.7.egg\Selenium2Library\keywords\keywordgroup.py", line 15, in _run_on_failure_decorator
    return method(*args, **kwargs)
  File "D:\RobotFramework_study\ride_64\PortablePython2.7.5.1\App\lib\site-packages\robotframework_selenium2library-1.7.4-py2.7.egg\Selenium2Library\keywords\_screenshot.py", line 90, in capture_page_screenshot
    if hasattr(self._current_browser(), 'get_screenshot_as_file'):
  File "D:\RobotFramework_study\ride_64\PortablePython2.7.5.1\App\lib\site-packages\robotframework_selenium2library-1.7.4-py2.7.egg\Selenium2Library\keywords\_browsermanagement.py", line 539, in _current_browser
    raise RuntimeError('No browser is open')
20180503 15:31:16.584 :  WARN : Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
20180503 15:31:16.585 :  INFO : chrome
20180503 15:31:16.603 :  FAIL : HTTPError: HTTP Error 503: Service Unavailable

  • 186****7486    2018-05-03 15:43:37
  • 阅读 1594    收藏 0    回答 3
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信