Scroll or Conditional commands takes too long to perform

Hi Team,

My problem is that it takes about 3 minutes to do scroll or condition actions!
Even if there is a simple “Scroll.scrollListToElementWithText” (detroitlabs liberary).

Here is a sample log:

1

System spec:

Katalon version: 6.3.2
Appium Version: 1.12.1
OS: Windows 10
Device: Samsung Galaxy S7 - G930F - Android 8.0.0 - API 26 (Physical device - not emulator)

@Chris_Trevarthen I use ( detroit-labs/katalon-mobile-util ) for doing scroll actions

Thanks

Hi @monfareddm,

3 minutes does seem long for a scroll. Could you provide some more info:

  • How many items are in the list you’re trying to scroll?
  • How many times is it scrolling to get to your desired selection?
  • Can you share the details of what one of the text elements looks in the list that has “Chile”? Namely if you capture it as a Test Object, what are its properties?

I’m thinking that if all of the text items have a specific resource-id, you might be able to cut down the time it takes Appium to parse the list of elements by using this function from katalon-mobile-util:

scrollListToElementWithText(String elementId, String elementText, Integer timeout)

Where the elementId is the Android object’s resource-id.

– Chris

Hi @Chris_Trevarthen
Thank you for helping us.

Could you provide some more info:

  • About 130 Items
  • The first step takes 3 minutes! I didn’t wait for the next steps because of this
  • Yes. That is the list of all countries. Here is the screenshot.

I’m thinking that if all of the text items have a specific resource-id , you might be able to cut down the time it takes Appium to parse the list of elements by using this function from katalon-mobile-util:

Yes. they have the same resource-id. So I tried again the method including resource-id and this times, scrolling performed 1 time very slow like before. The latency happens again either on performing (after touching) and before touch.
So, at last, the engine didn’t continue the scrolling and didn’t reach to the elements I need to and Test has failed with an error.
Here are the code and log. (Sorry I have to hide packageName of the app for some reason)

What should I do for a simple scrolling! I’m going crazy :expressionless:

Thank you for your kind

Hi @monfareddm,

As an experiment, could you try looking for “Algeria” instead of “Azerbaijan”? I want to make sure that the test is able to see the elements correctly if not scrolling.

We could also take a look at what elements that Katalon and Appium are seeing on the screen with katalon-mobile-util’s logger: https://github.com/detroit-labs/katalon-mobile-util#logging

By initializing it at the top of your test file, giving it a file location and a LogLevel of LogLevel.DEBUG, you should be able to see log output when the scrolling is attempted with something like Getting a scroll list of all elements. followed by a list of all of the visible elements that it detected that can be scrolled. If there isn’t anything in that list, then that could mean that the resource-id or class are not set correctly.

Hope this helps,

Chris