Silk Mobile

Table of Contents (Homepage)

Click

void click (Zone, Element, Index, ClickCount)

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

Click an element

Parameters

  • Zone: Select Zone

  • Element: Select "Element"

  • Index: Element Order

  • Click Count: Number of Clicks

Usage

Scenario: In the following example we will click on the"Login" button of the ExperiBank application. We will use the basic click command

Parameters:

  • Zone: set to "NATIVE"

  • Element: set to "id=loginButton"

  • Index: set to 0

  • Click count: set to 1

Result: Click event to the login button is sent

images/download/attachments/2688846/1.jpg

Code Examples

Command is available on all supported code languages

Java Example
client.click("NATIVE", "id=loginButton", 0, 1);
C# Example
client.Click("NATIVE", "id=loginButton", 0, 1);
VBScript Example
client.Click "NATIVE", "id=loginButton", 0, 1
Report
Python Example
self.client.click("NATIVE", "id=loginButton", 0, 1)
Perl Example
 $client->click("NATIVE", "id=loginButton", 0, 1);