Appium移动端自动化测试-常见error解决方法

1:Original error: Could not extract PIDs from ps output. PIDS: [], Procs: ["bad pid 'uiautomator'"]

解决方法:https://blog.****.net/u012106209/article/details/77012141

2:UiAutomator quit before it successfully launched) (WARNING: The server did not provide any stacktrace information

原因:UiAutomator手机端的端口被占用

解决方法:第一步 删除AppiumBootstrap.jar 位置 /data/local/tmp/   

                  第二步 重启手机 再次启动Appium 启动脚本

3:A new session could not be created. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 24.31 second

解决方法:重启手机 Appium

 

4:elenium.SessionNotCreatedException: A new session could not be created. (Original error: Remote install failed: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]) (WARNING: The server did not provide any stacktrace information)

解决方法: 

第一步:开启USB安装

Appium移动端自动化测试-常见error解决方法

第二步:执行脚本的时候 如果是第一次使用Appium安装APP 需要先安装下列两个APP (执行脚本后 根据手机提示进行即可)

Appium移动端自动化测试-常见error解决方法