[Mobile] Wait For Element Present
Description
Wait for the given mobile element to present within the given time (in seconds).
Keyword name: Mobile.waitForElementPresent
Parameters
Parameter | Parameter Type | Required | Description |
---|---|---|---|
to | TestObject | Yes | Represent a mobile element. |
timeOut | int | Yes | Maximum period of time (in seconds) that system will wait to return a result. |
flowControl | FailureHandling | Optional | Specify failure handling schema to determine whether the execution should be allowed to continue or stop. |
Returns
Param Type | Description |
---|---|
Boolean |
|
Example
You want to wait for 'App' control to be present in 10 seconds timeout.
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords 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'
Mobile.closeApplication()