How do I scroll to the bottom of the page in mobile testing?

Hi all,

I’m a newcomer doing the Android mobile testing and I’m stuck in a situation where I have to scroll in the application to click on the desired object item.

The object will be pop up after reach the bottom of the page and before it the object its not visible.

I tried to using swipe but it took 10 times to reach the bottom of the page and I decided not to using swipe cause its not effective I thought.

Use the MobileBuiltInKeywords class

The MobileBuiltInKeywords class provides a number of keywords for interacting with mobile devices, including the scrollToBottom() keyword.

To scroll to the bottom of a page using the scrollToBottom() keyword, follow these steps:

Import the MobileBuiltInKeywords class:
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords

Create a new instance of the MobileBuiltInKeywords class:

MobileBuiltInKeywords mobileBuiltInKeywords = new MobileBuiltInKeywords()

Call the scrollToBottom() keyword:

mobileBuiltInKeywords.scrollToBottom()

OR

Add the below to your script

new groovy.script.GroovyShell().evaluate(
“”"
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords

MobileBuiltInKeywords mobileBuiltInKeywords = new MobileBuiltInKeywords()

mobileBuiltInKeywords.scrollToBottom()
“”"
)

Let us know if it solves your problem

this function doesn’t exist in Katalon 9.7

Hi there, :wave:

Thank you very much for your topic! It may take a little while before Katalon team member or others forum members respond to you.

In the meantime, you can double-check your post to see if you can add any extra information i.e. error logs, HTML codes, screenshots, etc. Check out this posting guide to help us help you better!

Thanks! :sunglasses:
Katalon Community team