Appium appium 10054 错误

zhennan · 2014年06月25日 · 最后由 86guoke 回复于 2017年08月04日 · 2333 次阅读

大家好 ,新手学 appium 遇到个问题 ,麻烦帮下忙,thanks:

上面是 log 截图
下面是 python shell 报错内容 :

Traceback (most recent call last):m
  File "C:\Users\Administrator.NNE5FMGQKGNSGCI\Desktop\dfefefefe.py", line 11, in <module>
    driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',s)
  File "C:\Python27\lib\site-packages\appium\webdriver\webdriver.py", line 34, in __init__
    super(WebDriver, self).__init__(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 73, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 121, in start_session
    'desiredCapabilities': desired_capabilities,
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 171, in execute
    response = self.command_executor.execute(driver_command, params)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 347, in execute
    return self._request(command_info[0], url, body=data)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 415, in _request
    resp = opener.open(request)
  File "C:\Python27\lib\urllib2.py", line 400, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 418, in _open
    '_open', req)
  File "C:\Python27\lib\urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1207, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python27\lib\urllib2.py", line 1180, in do_open
    r = h.getresponse(buffering=True)
  File "C:\Python27\lib\httplib.py", line 1030, in getresponse
    response.begin()
  File "C:\Python27\lib\httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "C:\Python27\lib\httplib.py", line 365, in _read_status
    line = self.fp.readline()
  File "C:\Python27\lib\socket.py", line 447, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 10054] 

下面是执行的代码 :

# encoding=utf8 
from appium import webdriver
s={}
s['platformName'] = 'Android'
s['appium-version']= '1.1.0.0'
s['platformVersion'] = '4.3'
s['deviceName'] = '2008edada447  '
s['app'] =r'E:\jingdong_9807.apk'
s['app-package'] = 'com.jingdong.app.mall'
s['app-activity'] ='com.jingdong.app.mall.MainActivity'
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',s)

环境是 windows 7 appiumforweindows 版本 1.1 测试为 安卓 4.3 真机
thanks

共收到 4 条回复 时间 点赞

看了下图,实在眼睛 hold 不住。爱莫能助,sorry

#4.1 启动变量
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['version'] = '4.2'
desired_caps['deviceName'] = '192.168.56.101:5555'
desired_caps['automationName'] = 'selendroid'
desired_caps['app'] = r'D:\code\app\acfun_2.5.7.0.apk'
desired_caps['appPackage'] = 'tv.acfundanmaku.video'
desired_caps['appActivity'] = 'tv.acfundanmaku.video.entity.activity.SplashActivity'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

我的代码,你可以参考下!

新手支持

楼主,这个问题解决没,我现在被这个问题困扰中,老是报这个 10054

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册