appium问题随笔记录
平时遇到的问题汇总
1.问题1code137.
Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error:
'Command 'D:\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s b3b50f25 shell ime enable io.appium.settings/.UnicodeIME' exited with code 137'; Stderr: ''; C
ode: '137'
解决办法:注销
'unicodeKeyboard': True,
'resetKeyBoard': True
2.运行报错:Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
解决办法:
将参数’automationName’='UiAutomator1’
3.手机端安装好io.appium.uiautomator2.server.apk后,运行代码时,手机端老提示需要重新安装io.appium.uiautomator2.server.apk;
解决办法:添加'skipServerInstallation':True,就可以了。
4.打开uiautomatorviewer工具,
报错Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist! Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
解决办法:
关闭appium server重启,重新连接测试真机。
5.Appium 运行脚本报错InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for
根本原因1:电脑里安装的selenium版本和Appium-Python-Client版本不兼容
解决办法:卸载Appium-Python-Client,重安装最新版本,一般我用的是Appium-Python-Client==2.0.0,会自动安装对应的selenium的版本
6.
查看包名和启动页
adb shell dumpsys activity recents |find "intent={"
本文来自博客园,作者:小排顾,转载请注明原文链接:https://www.cnblogs.com/SparkProgram/p/18704191
浙公网安备 33010602011771号