Silk Mobile

Table of Contents (Homepage)

SyncElements

SyncElements (SilentTime, 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 period of time for the screen to be silent.

  • Timeout - Waiting Timeout in milliseconds.

Usage

In this example, I will wait the screen to come silent after the loading symbol goes off from the page and the movie tiles are loaded. I need the rest of the script to wait until the new page is loaded. I need the page to be still for 3000 milliseconds within the timeout specified.

images/download/attachments/3309875/image2015-7-28%2017_31_55.png

Parameters:

  • SilentTime - The time for the screen to be silent – will be set to 3000

  • Timeout 10000

images/download/attachments/3309875/image2015-7-28%2017_33_27.png

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
}