Silk Mobile

Table of Contents (Homepage)

Sync

boolean sync (SilentTime, Sensitivity, Timeout)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

images/images/os-icons/os_symbian02_150x150.png

images/images/os-icons/os_windows_mobile_150x150.png

Description

Waits for the screen to become silent.

Parameters

  • SilentTime: The time for the screen to be silent

  • Sensitivity: Sensitivity from 0 - 100 ("0" = no sensitivity)

  • 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 be loaded.

Parameters:

  • SilentTime: will be set to 2000

  • Sensitivity: will be set to 100

  • Timeout: will be set to 10000

images/download/attachments/3309879/3.jpg

Result: Only once the Loading wheel will disappear we will move to the next command on the script.

images/download/attachments/3309879/4.jpg

Code Examples

Java Example
if(client.sync(2000, 100, 10000)){
// If statement
}
C# Example
if(client.Sync(2000, 100, 10000))
{
// If statement
}
VBScript Example
If StrComp (client.Sync ( 2000, 100, 10000 ), "True") = 0 Then
Report
'If statement
Else
Report
End If
Python Example
if(self.client.sync(2000, 100, 10000)):
# If statement
pass
Perl Example
if($client->sync(2000, 100, 10000)){
# If statement
}