appium 踩坑记录

1.报错信息:because package io.appium.uiautomator2.server.test does not have a signature matching the target io.appium.uiautomator2.server

  • 解决办法:
    目测应该是io.appium.uiautomator2.server.test.apk和io.appium.uiautomator2.server.apk 对应不上
    所以重新安装这两个apk
    在执行用例的时候
caps["skipServerInstallation"] = False  # 默认为False,这句不添加也行,之前是把这个地方设置为True了
self.driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)

再跑一次,执行成功。

2.报错信息

[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {"code":"ECONNRESET"}

  • 解决办法:
    重装appium软件包
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
adb uninstall io.appium.settings

python脚本中caps["skipServerInstallation"] = True #这句需要屏蔽掉

原文地址:https://www.cnblogs.com/congyinew/p/12324395.html