Unable to find elements not visible on screen

Hi,
I just started trying out Katalon, and am trying out ‘https://docs.katalon.com/katalon-studio/docs/scroll_element_mobile_automation.html#script-mode’ on the APIDemos.apk.

What I want to do is go to a page, scroll down to an element not visible at the moment, and click it. See Step 10: ‘Select Scroll To Text method and pass input as Tabs’. I want to click on Tabs after this step.

I have the problem that the mobile object spy and the mobile recorder are only showing me the elements which are visible on the screen at that moment, and I can’t scroll down to these elements in the spy/recorder. Because of that I can’t see add the elements to the object repository, and can’t write test steps to use this element. I would like to go to a certain page, scroll, and THEN open recorder at that point, but I have not seen how to do that.

I think for web applications you can interact with the page with the recorder open and run test steps, but I don’t see how to save this problem for mobile.

I feel like I am missing a very basic method, but I can’t find how to do this anywhere.

Hello @emine1,

I have the following feedback (if I understand this correctly)

  1. At the moment, Katalon mobile keywords contain only the “Scroll to text”. Please see this extended library made by @Chris_Trevarthen and read this answer, or even the entire post.
    Mobile - Capture object attributes - several problems prevent app flavor testing

  2. Why do you need to scroll in the record utility itself?
    The record utility is also a bit limited, mobile app world does not provide the same possibilities as the web browser world.
    So why not you manually scroll on the device screen during the record action, capture/record more objects found at the bottom of the screen and then insert in the resulting test case a step that scrolls/swipes down. That additional step can be produced by using the library from #1. This is how I do it and it works so far for everything needed.

Thank you,
Cornel

Hello @Neascu_Cornel,

Thank you for your answer!

I tried manually scrolling in the device screen, but nothing seemed to be happening, even if I clicked ‘refresh’ in recorder, so I didn’t know how this was supposed to work. No idea why this doesn’t work, but I found a workaround: if I click ‘switch to portrait’ it refreshes the screen and shows the bottom elements.

Edit: I found out that ‘Capture object’ does what I was looking for and thought ‘Refresh’ should do

Thank you,
Emine

1 Like

I am not really using the record utility myself, since I believe no tool can do this magic really well, especially the free ones.
What I do is use Spy, capture and organize needed elements in relevant named folders of Object repository and then manually build my test case steps using them.
If I need a swipe or scroll I do that manually and do not expect that record will hold all the actions made. Again, mobile world is not as developed/permissive as the web world.
I do not use Record in Websites either, for that matter. I do not like record keeping all the dummy clicks I may perform during the record.
And rather than deleting not needed steps I prefer manually building them from scratch, with relevant named objects and also be in control of what attributes those objects use.

It’s my belief that most of those who produce automation for complex projects/behavior do it this way, and for sure not by record. Record is useful only for entry level/learning purposes.

Cornel