Silk Mobile

Table of Contents (Homepage)

Sleep

void sleep(time)

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

Description

Pause the script for a specify time in milliseconds.

Parameters

  • Time: The time to sleep in milliseconds

Usage

Scenario: We will use the 'sleep' command to wait for a Facebook application to load the page after clicking the CNN option on the search menu.

Parameters:

  • Time: The time to sleep in milliseconds – will be set to "5000"

images/download/attachments/3310103/10.jpg

Code Examples

Java Example
client.sleep(5000);
C# Example
client.Sleep(5000);
VBScript Example
client.Sleep 5000
Python Example
self.client.sleep(5000)
Perl Example
$client->sleep(1000);