Appium 【求助】android4.4.2 windows 下 appium 0.17.6 运行报错 socket.error

LW · 2014年04月08日 · 607 次阅读

import os
from selenium import webdriver

Returns abs path relative to this file and not cwd

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.4.2'
#desired_caps['app'] = PATH('D:\Python\appium\ContactManager.apk')
desired_caps['app-package'] = 'com.example.android.contactmanager'
desired_caps['app-activity'] = '.ContactManager'

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

el = driver.find_element_by_name("Add Contact")
el.click()

textfields = driver.find_elements_by_tag_name("textfield")
textfields[0].send_keys("My Name")
textfields[2].send_keys("someone@somewhere.com")

driver.find_element_by_name("Save").click()

driver.quit()

====官方测试源码

报错:
socket.error:[errno 10054]

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