Introduction
Hey Readers!!
We all know about the scroll element in mobile applications, and we use this daily.
But have you ever wondered how this scroll-to-text works in Katalon?
In this article, you will learn about this.
Let's begin!!!

Scenario
In this article, you'll be learning how to scroll down to a particular element in the mobile application and to do this there are two ways to do this:
- Manual Mode
- Script Mode
Let's look at these in detail.
Manual Mode
1. In the section Add, select the Binary Statement.

2. Click on the Input field. Choose the Variable value type in the Left Expression, then give the variable the name path.
3. In the right Expression, select the value type as binary, then select the value.

4. In the left Expression, select the value type as Method call. Then in the Method call input box, select the following:
Object Type = Class,
Object as RunConfiguration
method =getProjectDir()
5. Choose String as the Value Type for Right Expression and provide the path to the /folder name/apk file name with extension.
6. On the mobile keyword, select Start Application and then click on input. Select Value Type as Variable in the appFile, then Pass the variable name as a path in value.
7. After this, Add Wait For Element Present item.
8. Call Scroll To Text from mobile keyword Call Scroll and pass Views in Value. Then the Scroll To Text accepts the String type parameter.
9. Call the Tap method, passing the Views object from the Object Repository.
10. Click on the Scroll To Text method, then select Tabs as the input.

Script Mode
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
'Path of the Apk File Store in the path variable'
def path = RunConfiguration.getProjectDir() + '/Data Files/ApiDemos.apk'
'Let’s Start the application'
Mobile.startApplication(path, false)
'Wait for the element Present of Heading API Demos'
Mobile.waitForElementPresent(findTestObject('API Demos Objects/heading_API_Demos'), 54)
'Scroll to the Views text'
Mobile.scrollToText('Views', FailureHandling.STOP_ON_FAILURE)
'Tap on the Views'
Mobile.tap(findTestObject('API Demos Objects/text_Views'), 22)
'Scroll to the Tabs text'
Mobile.scrollToText('Tabs', FailureHandling.STOP_ON_FAILURE)





