Page tree
Skip to end of metadata
Go to start of metadata

void click (zone, element, index, ClickCount, X, Y)

Supported in iOS Supported in Android


Click an element with an offset 



Command usage: There is the possibility to use the extended version of the click command.

There are two additional parameter you need to give

  • X: Horizontal Offset from Element. "+" before the number in X field means Right and "-" means Left.
  • Y: Vertical Offset from Element. "+" before the number in Y field means Down and "-" means Up. 

Scenario: In the following example I will click on the"Last Name" field.

To press on the 'First Name' text field you can use the "click" command, and set the vertical offset so that the click  will be executed under the label and in the text field.


  • Zone: set to be "WEB"
  • Element: set to "text=First Name"
  • Index: set to 0
  • Click count: number of clicks - set to 1
  • X: The vertical offset from the middle of the object – set to 0
  • Y: The horizontal offset from the middle of the object– set to 20

Result: The element will be recognized but the Click event will be sent on an offset to the text field.

Code Examples

Command is available on all supported code languages

Java Example"WEB", "text=First Name", 0, 1, 0, 20);
C# Example
client.Click("WEB", "text=First Name", 0, 1, 0, 20);
VBScript Example
client.Click "WEB", "text=First Name", 0, 1, 0, 20
Python Example
self.client.clickOffset("WEB", "text=First Name", 0, 1, 0, 20)
Perl Example
$client->clickWithOffset("WEB", "text=First Name", 0, 1, 0, 20);