Skip to main content
Version: legacy

[Mobile] Wait For Element Present


Wait for the given mobile element to present within the given time (in seconds).


ParameterParameter TypeMandatoryDescription
toTestObjectRequiredRepresent a mobile element.
timeOutintRequiredMaximum period of time (in seconds) that system will wait to return a result.
flowControlFailureHandlingOptionalSpecify failure handling schema to determine whether the execution should be allowed to continue or stop.


Param TypeDescription
  • true: the element is present within the timeout.
  • false: the element is NOT present within the timeout.


You want to wait for 'App' control to be present in 10 seconds timeout.

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import as Mobile
import internal.GlobalVariable as GlobalVariable

'Start application on current selected android\'s device'
Mobile.startApplication(GlobalVariable.G_AndroidApp, false)

'Wait for app control to be present in 10 seconds timeout'
Mobile.waitForElementPresent(findTestObject('Object Repository/Application/android.widget.TextView - App'), 10)

'Close application on current selected android\'s device'