SyncElements (SilentTime, Timeout)
Description
Waits for all the UI elements on the page to be ready. Works on the dump level. Returns true when there are no changes to the elements dump.
Parameters
- SilentTime - The period of time for the UI elements to be static (No changes to the dump).
- Timeout - Waiting Timeout in milliseconds.
Usage
Scenario: In this example, We will use the SyncElements command to wait for all the UI elements in Google Play to load before resuming our script.
Parameters:
- SilentTime: will be set to 3000 - 3 seconds
- Timeout: will be set to 10000 - 10 seconds
Result: The script will resume only after all of the UI elements on the page load. If the page takes more than 10 seconds to load the command will timeout and the script will continue.
Code Examples
Java Example
if(client.syncElements(3000, 10000)){ // If statement }