The appium script executes Android_UI automation, and the app always flashes back to the desktop

1. Use the tool
appium python pycharm
2. The object under test and the device
to test the app on the real machine
3. Problems encountered
Execute test cases in batches. When a certain step of some use cases is executed, the app will automatically return to the mobile desktop and start to execute the next use case. Because the previous failure caused the next use case to fail to find the page element (the location of each failure is random). After all the use cases are executed, the failed use cases are executed separately, and the use cases are successfully executed without modifying the code (indicating that there is no problem with the use case code).
4. How to solve Add the following code desired_caps['newCommandTimeout']=600 timeout
when configuring appium to prevent communication timeout. The time unit is seconds by default, where 600 seconds means 10 minutes.




insert image description here

Guess you like

Origin blog.csdn.net/kldzh/article/details/126464474