Appium unable to find locator in long execution of Test cases

Appium unable to find locator in long run of Test cases execution

We have around 700 Test cases and this takes around 9-10 hours but after some time appium ubale to locate the locator and Test cases gets failed.

Configuration : We pare running 4 devices , iOS phone , iOS Tablet , Android phone and Android Tablet and we are running all 4 device parallel through appuim server which connected through LAN
Appium Version : 1.7.2
Web driver version : 2.53.0
Xcode : 9

Please let me know if more information require.

This is not appium issue but your test case design issue.

http://www.javadoc.io/doc/io.appium/java-client/6.0.0-BETA2 > java.lang.String getPageSource()

Whenever your test case throws exception saying element not found, print page source and search if expected page was really loaded.

This is purely timing issue and nothing to do with appium.

Solution:

  • Increase “explicit” wait for the elements which fails frequently ( keep implicit wait to minimum as possible )
  • keep track of failures over the days to find out pattern & apply above logic