开发者

Selenium 2.5 unable to use driver.get on Android

I have everything running well on iOS, and am trying to get up and running with Android web testing. I am writing the tests in Python 2.7.2.

I get an exception when I try the below code:

from selenium import webdriver
driver = webdriver.Remote(desired_capabilities="ANDROID", command_executor='http开发者_开发问答://localhost:8080/wd/hub')
driver.get('http://www.google.com')

I get an exception with the driver.get command. But the same command works on iOS. Is there a different implementation for Android?

Exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium-2.5.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 154, in get
    self.execute(Command.GET, {'url': url})
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium-2.5.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 144, in execute
    self.error_handler.check_response(response)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium-2.5.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 118, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: None ; Stacktrace: Method handle threw an error in WebDriverHandler.java
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜