简体   繁体   中英

How to improve time between taps in appium?

In order to tap on a button in floating menu that exists only for 3 seconds, I need to first tap on a button to view the floating menu and then tap on another button.

I have to tap two buttons in less than 3 seconds because of timeout.

The problem is that appium isn't fast enough to these 2 taps in less than 3 seconds and the test always fails.

  1. Review all the xpath expressions , and try either replacing them with proper accessibility labels. if that is not possible then use the helper functions of Appium API like xpath_visible_contains , text, button etc. I have noticed that find_element is really slow for xpath expressions.
  2. For the freeze issue look for NSLog in your code and ensure that you are not logging large chunk of data there is a radar defect for this as it halts the simulator.
  3. I had to restructure my test cases to remove any un-necessary calls to find_element and any extra steps. Hope that link will help you : http://www.qaautomationsimplified.com/android/restarting-appium-server-improve-various-server-freezing-issues-may-improve-execution-time/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM