Skip to main content

SeeTestAutomation - SyncElements

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

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.

P****arameters:

  • 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 Expand source

if(client.SyncElements(3000, 10000))
{
// If statement
}

VBScript Example Expand source

If StrComp (client.SyncElements ( 3000, 10000 ), "True") = 0 Then
Report
'If statement
Else
Report
End If

Python Example Expand source

if(self.client.syncElements(3000, 10000)):
# If statement
pass

Perl Example Expand source

if($client->syncElements(3000, 10000)){
If statement
}