Unable to Scroll to Element and setText in Mobile App Pop-up screen

Mobile Application opens a pop-up screen. I can only tap+scroll to the bottom of the pop-up window and fill the text value. During record I can capture the object which there in the bottom of the pop up screen. I was unable to tap and scroll to that element and setText. I tried with ScrollToText method which is not working.

Do we have any built-in Keyword something like TapAndScrollToElement ?

Could you please someone help me on this?

Hi @tdautomation, this might help: [Mobile] Scroll To Text | Katalon Docs

@Dave_Evers - I already tried with Scroll To Text which is not working.

Hi @tdautomation,
Maybe try this: Scroll to position/element in KR - #2 by ThanhTo

Or this:

int xpos = 10
int ypos = 100
WebUI.scrollToPosition(xpos, ypos)
1 Like

Hi @tdautomation. I think that what you are saying is that you are trying to scroll a pop-up screen that covers only a section of the mobile screen. I have not seen a built-in keyword for this but have achieved scrolling a portion of the mobile screen by finding the position of the object that can scroll then finding the height and width of that object and manually scrolling using swipe. Here is an example where only the bottom half of the screen can scroll and I am scrolling down a list for a number of scrolls that we set. Hopefully I understood you correctly and this helps.

int left = Mobile.getElementLeftPosition(<object in scroll view>)
int width = Mobile.getElementWidth(<object in scroll view>)
int x = (left + width)/2      // x position is in the middle of scroll object
int top = Mobile.getElementTopPosition(<object in scroll view>)
int height = Mobile.getElementHeight(<object in scroll view>)
int y = (top + (top+height))/2     // y position is middle of scroll view
int endScroll = y - (<amount we want to scroll down>)    

int count = 0

while (	Mobile.waitForElementPresent(<object we are looking for>)  && count < (maximum number of scrolls) ) {
    Mobile.swipe(x, y, x, endScroll)
    count ++ 
1 Like