Selenium 2.5无法在Android上使用driver.get

时间:2011-09-09 17:53:56

标签: android python selenium-webdriver

我在iOS上运行良好,并且正在尝试使用Android网络测试。我在Python 2.7.2中编写测试。
我尝试以下代码时遇到异常:

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


我用driver.get命令得到一个异常。但是同样的命令适用于iOS。 Android有不同的实现吗?

例外:

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 个答案:

没有答案