Page tree
Skip to end of metadata
Go to start of metadata

SyncElements (SilentTime, Timeout)

Supported in iOS Supported in Android

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
}
C# Example
if(client.SyncElements(3000, 10000))
{
// If statement
}
VBScript Example
If StrComp (client.SyncElements ( 3000, 10000 ), "True") = 0 Then
	Report
	'If statement
Else
	Report
End If
Python Example
if(self.client.syncElements(3000, 10000)):
# If statement
pass
Perl Example
if($client->syncElements(3000, 10000)){
If statement
}
  • No labels