SeeTestAutomation - Sync
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 .
boolean sync (SilentTime, Sensitivity, Timeout)
Description
Waits for the screen to become silent, works on the visual level of the screen.
Parameters
- SilentTime: The time for the screen to be silent.
- Sensitivity: 0 - sensitive to every change, 100 - not sensitive to changes.
- Timeout: Waiting Timeout in milliseconds if page is still not silent.
Usage
Scenario: In this example we will load the CNN page on facebook. We will use the Sync command to wait for the new page to load.
Parameters:
-
SilentTime: will be set to 2000 - 2 seconds
-
Sensitivity: will be set to 0 - maximum sensitivity to changes
-
Timeout: will be set to 10000 - 10 seconds
Result: Once the Loading wheel disappears we will move to the next command on the script. If the loading wheel does not disappear in 10 seconds the command will timeout and the script will resume.
Code Examples
Java Example
if(client.sync(2000, 0, 10000)){
// If statement
}
C# Example Expand source
if(client.Sync(2000, 0, 10000))
{
// If statement
}
VBScript Example Expand source
If StrComp (client.Sync ( 2000, 0, 10000 ), "True") = 0 Then
Report
'If statement
Else
Report
End If
Python Example Expand source
if(self.client.sync(2000, 0, 10000)):
# If statement
pass
Perl Example Expand source
if($client->sync(2000, 0, 10000)){
# If statement
}