Python+appium自動化踩坑(二):Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.


在使用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.

 

 

現象:如圖在Start Session 后,需要在手機上安裝,Appium Settingio.appium.uiautomator2.server 、io.appium.uiautomator2.server.test,一切軟件都裝完成后,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.

 

 

 

 

 如果終止某個軟件安裝,報錯:An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'D:\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s D3H0217C13000820 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk' exited with code 1'; Stderr: ''; Code: '1'

 

 

 

 最后在全部日志中查找出,If you wish to use that automation instead of UiAutomator2, please add 'automationName=UiAutomator1' to your desired capabilities。

 

 

 

 

 所以,在添加參數的時候加上參數 automationName=UiAutomator1。結果成功解決問題。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM