美文网首页Appium爬虫相关
appium 初次接触遇到的一些问题

appium 初次接触遇到的一些问题

作者: Shawn丶 | 来源:发表于2020-01-07 16:16 被阅读0次

初次使用appium,连接了真机,准备打开真机的设置,也就是settings。作为测试。

共遇到两个问题
error: failed to launch Appium Settings app
error: The instrumentation process cannot be initialized. Make sure the application under test does.

首先遇到了,这个问题,没有明显报错,但是一直显示无法打开应用。
下面是我的代码以及报错


image.png

报错:

[AndriodDriver] failed to launch Appium Settings app: Condition unmet after 5335ms. Timing out.
image.png

根据报错,发现,是一直getting io.appium.settings 这个包。然后时间超时。
因此很有可能是这个包的问题,于是我换了个手机,测试,发现,另一个真机在进行第一次操作的时候,会安装appium settings以及两个iuautomator2的包,如下


image.png

然后回到一直报错的真机,发现没有没有这三个包(可能被删了),但是报错内容里确实是有这个包的。如图


image.png

那么可以尝试删除这个io.appium.settings这个包,重新装

adb uninstall io.appium.settings

删除后,重新跑
遇到了另一个问题

error: The instrumentation process cannot be initialized. Make sure the application under test does.

[https://blog.csdn.net/jianglianye21/article/details/89947930]
该博主跟我遇到了同样的问题,但是我用他的方法没有成功
后来我发现,需要两个包都卸载掉。
也就是

adb uninstall io.appium.settings
adb uninstall io.appium.uiautomator2.server.test

然后退出当前的appium,重新开启服务。
成功解决。

相关文章

网友评论

    本文标题:appium 初次接触遇到的一些问题

    本文链接:https://www.haomeiwen.com/subject/vyaractx.html