0

Is there any reason whatsoever for huge performance issues after clicking an item that brings you up to another screen ?

I've successfully done some very nice and fast unit testing with appium in python over an android app. The problem is, everything works fast and fine, until I click an item that shows more products in a new screen. After that, every single call to self.driver.find_element_by_id or by whatever takes like 10 full seconds no matter what, before it was instant.

I did timing and performance testing, and after clicking the item with .click(), everything takes 10 full seconds to complete, which was instant before.

Is there any reason behind this that I'm missing ? Maybe because of switching to the new screen that might be a a different activity ?

Example:

self.driver.find_element_by_id("sticky") <= every call before this is pretty much instant
more_item.click()                        <= this click ruins everything
sleep(5)
self.driver.find_element_by_id("sticky") <= every call from now on, even if it's the same as above, takes 10 full seconds no matter what
Wasiq Bhamla
  • 949
  • 1
  • 7
  • 12
Alin Lipan
  • 219
  • 3
  • 14

1 Answers1

0

instead of using self.find_element_by_id(***) use find_element_by_androidUIAutomator that will increase the response time of Appium for you.

Hope this helps.

Nauman Malik
  • 188
  • 8
  • I ended up parsing the source xml page... I will give a try with byUIAutomator though, that's the only thing I never tried, but it's still wierd... the delay has nothing to do with the processing time... because it's a full 10 seconds, no matter what you search for... even by a single id... or by **, same time. – Alin Lipan Dec 12 '18 at 07:33