关于RobotFramework简单登录脚本的WebDriverException

时间:2015-02-19 13:33:01

标签: python-2.7 selenium-webdriver robotframework browser-automation

我刚开始用Selenium2Library学习RobotFramework,我无法解决一个简单脚本的问题。

环境:

  • Linux Mint
  • Selenium2Library
  • Firefox 35.0.1
  • Python 2.7.6

RobotFramework测试用例

*** Settings ***
Library            Selenium2Library

*** Test Cases ***
Verify that user can see his or her name on logging onto Facebook
      Navigate to Facebook
      Input text                id=mad        johndoe@gmail.com
      Input password            id=pass          mypassword
      Click Button              id=u_0_l
      Page should contain       John Doe

*** Keywords ***
Navigate to Facebook
      Open Browser    firefox
      Go to           http://www.facebook.com

异常

Full Name:  Loginfb.Verify that user can see his or her name on logging onto Facebook
Start / End / Elapsed:  20150219 15:29:02.749 / 20150219 15:29:06.655 / 00:00:03.906
Status:     FAIL (critical)
Message:    WebDriverException: Message: f.QueryInterface is not a function Stacktrace: at FirefoxDriver.prototype.get (file:///tmp/tmp6FDy0N/webdriver-py-profilecopy/extensions/fxdriver@googlecode.com/components/driver-component.js:9504:13) at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmp6FDy0N/webdriver-py-profilecopy/extensions/fxdriver@googlecode.com/components/command-processor.js:11635:16) at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmp6FDy0N/webdriver-py-profilecopy/extensions/fxdriver@googlecode.com/components/command-processor.js:11640:7) at DelayedCommand.prototype.execute/< (file:///tmp/tmp6FDy0N/webdriver-py-profilecopy/extensions/fxdriver@googlecode.com/components/command-processor.js:11582:5)

1 个答案:

答案 0 :(得分:-1)

发现问题:
      打开浏览器https://www.facebook.com Firefox
      转到https://www.facebook.com