Silk Mobile

Table of Contents (Homepage)

SetDefaultTimeOut

Example

SetDefaultTimeout(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

Set the default timeout for click commands

Parameters

  • Timeout: The Timeout value.
    The value -1 will set it back to initial timeout of 10000 ms

Usage

Example

Command usage

When we want to extend the timeout of a command to postpone our test from failing because of timeout issues.

Scenario: In the following example we will use the 'SetDefaultTimeout' to extend the timeout for a click command to execute. We will use a click command on an element that does not exist on the page and also change the default timeout for this command to fail.

Parameters:

  • Timeout (in milliseconds) - Will be set to 30000 in this example.

Step 1: Add command of 'SetDefaultTimeout' command with parameter Timeout=30000.

images/download/attachments/3310632/image47.png

Step 2: Add click command on icon that does not exist on the home screen. In this example we will try to click an icon by the name 'text=Does_Not_Exist'

Note: The click command was trying to execute for 30 seconds (as we set in the Timeout) before failing.