51Testing软件测试论坛

标题: Appium问题 [打印本页]

作者: lovelorn0327    时间: 2015-1-9 10:51
标题: Appium问题
import os
from selenium import webdriver
PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(__file__), p)
)
desired_caps={}
desired_caps['device']='Android'
desired_caps['browserName'] = ''
desired_caps['version'] = '4.2.2'
desired_caps['app'] = PATH('C:\\Users\\guji\\Desktop\\APK\\DriveNetInfo-51.12.85_110000004.apk')
desired_caps['app-package'] = 'xxxxxxx'
desired_caps['app-activity'] = 'xxxxxxxx'
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)


D:\Tools\Python27\python.exe C:/Users/guji/Desktop/Pytest/appiumTest.py
Traceback (most recent call last):
  File "C:/Users/guji/Desktop/Pytest/appiumTest.py", line 14, in <module>
    driver = webdriver.Remote('http://192.168.85.1:4723/wd/hub',desired_caps)
  File "D:\Tools\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 73, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "D:\Tools\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 121, in start_session
    'desiredCapabilities': desired_capabilities,
  File "D:\Tools\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 171, in execute
    response = self.command_executor.execute(driver_command, params)
  File "D:\Tools\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 349, in execute
    return self._request(command_info[0], url, body=data)
  File "D:\Tools\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 417, in _request
    resp = opener.open(request)
  File "D:\Tools\Python27\lib\urllib2.py", line 404, in open
    response = self._open(req, data)
  File "D:\Tools\Python27\lib\urllib2.py", line 422, in _open
    '_open', req)
  File "D:\Tools\Python27\lib\urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "D:\Tools\Python27\lib\urllib2.py", line 1214, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "D:\Tools\Python27\lib\urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 10061] >

请教给位这是什么问题呀


作者: 幻龙    时间: 2015-4-23 18:42
appium 没有启动~




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2