Appium启动时的一些坑点

坑点一:启动appium会话报错 An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

使用豆瓣APP和夜神模拟器进行测试:
在这里插入图片描述
在这里插入图片描述
原因: 起初以为没有安装手机上没有安装uiautonator2对应的应用导致,可以检查应用管理发现已经安装成功,网上找了很多资料都解决不了。后来发现以前的电脑上可以正常使用,对比后发现原来是JDK的问题,这个电脑装的最新版的JDK,不是JDK1.8
在这里插入图片描述
解决方案: 卸载原有JDK,安装JDK1.8,并配置环境变量

坑点二:使用真机测试时,报错 An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

在这里插入图片描述
解决方案: 最后在全部日志中查找出,If you wish to use that automation instead of UiAutomator2, please add ‘automationName=UiAutomator1’ to your desired capabilities
在这里插入图片描述

所以,只需要在启动项中加入automationName=UiAutomator1即可
在这里插入图片描述
注:写json格式的数据时,记得后面需要带逗号,我就忘记逗号然后一直报错
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值