Appium Python 脚本调用,驱动 APPium 超时报错,Try to increase the 60000ms adb execution timeout represented by 'adbExecTimeout' capability

lanxian · 2020年03月24日 · 2781 次阅读

Python 脚本如下:操作微信登录键

from appium import webdriver
import time
desired_caps = {}
# 获取操作平台
desired_caps['platformName'] = 'Android'
#desired_caps['platformVersion'] = '4.4.2'
# 获取设备名
desired_caps['deviceName'] = '127.0.0.1:62001'
# 获取包名
desired_caps['appPackage'] = 'com.tencent.mm'
# 获取活动名
desired_caps['appActivity'] = '.plugin.account.ui.WelcomeActivity'

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

try:

com.tencent.mm:id/f34 为通过 uiautomatorviewer 截取微信界面获取到的登录键

element = driver.find_element_by_id('com.tencent.mm:id/f34')
# 如果找到该 id 所指定控件,则进行点击操作
element.click()
except:
print "exist"
pass
time.sleep(2)
# 断开连接
driver.quit()

报错信息如下:
Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'D:\MyProjectApplication\Android\android-sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:62001 push 'C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk' /data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk' timed out after 60000ms'. Try to increase the 60000ms adb execution timeout represented by 'adbExecTimeout' capability

共收到 0 条回复 时间 点赞
lanxian 关闭了讨论 03月27日 12:42
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册