SeeTestAutomation - Click(Offset)
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
void click (zone, element, index, ClickCount, X, Y)
Description
Click an element with an offset
Parameters
- Zone: Select Zone
- Element: Select "Element"
- Index: Element Order
- Click Count: Number of Clicks
- X: X offset in pixel from center of the element (optional)
- Y: Y offset in pixel from the center of element (optional)
Usage
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.
Parameters:
- 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
client.click("WEB", "text=First Name", 0, 1, 0, 20);
C# Example Expand source
client.Click("WEB", "text=First Name", 0, 1, 0, 20);
VBScript Example Expand source
client.Click "WEB", "text=First Name", 0, 1, 0, 20
Report
Python Example Expand source
self.client.clickOffset("WEB", "text=First Name", 0, 1, 0, 20)
Perl Example Expand source
$client->clickWithOffset("WEB", "text=First Name", 0, 1, 0, 20);