Silk Mobile

Table of Contents (Homepage)

ClickCoordinate

void ClickCoordinate(X, Y, 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 in window X,Y offset

Parameters

  • X: Horizontal Offset from the Element in screen pixels (can use P2cx to convert screen percentage to pixels)

  • Y: Vertical Offset from the Element in screen pixels (can use P2cy to convert screen percentage to pixels)

  • Click Count: Number of Clicks

Usage

If for some reason, you want to click on a specific coordinates on the screen instead of an object you can use the "ClickCoordinate" command.

Scenario:

We will use the facebook website and will use the clickCoordinate command to click on the 'add friend' button.

To get the correct coordinates, we will use the offline tab (Capture Scene) and will get the coordinates from a screenshot we captured (Width/Height).

images/download/attachments/2689446/3.jpg

Parameters:

  • X: will be set to991

  • Y: 460

  • Click count: will be set to 1

Code Examples

Java Example
client.clickCoordinate(991, 460, 1);
C# Example
client.ClickCoordinate(991, 460, 1);
VBScript Example
client.ClickCoordinate 991, 460, 1
Report
Python Example
self.client.clickCoordinate(991, 460, 1)
Perl Example
$client->clickCoordinate(991, 460, 1);