SeeTest Client - ClickCoordinate
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 ClickCoordinate**(X, Y, ClickCount)**
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).
Double click in Android
The ClickCoordinate() command can be used to execute a double click event by setting click count parameter to '2'.
To determine the time gap between the two clicks, the setProperty() should be used to define the clicks.time.gap property with positive integer value for milliseconds between the two clicks. The default time for this property is '100' milliseconds.
The clicks.time.gap is relevant in android only for double click in ClickCoordinate() command. For iOS there's another use for clicks.time.gap property
Example
If we want to zoom a picture with double click.
Parameters:
- X: will be set to 991
- Y: 460
- Click count: will be set to 1
Code Examples
Java Example
client.clickCoordinate(991, 460, 1);
C# Example Expand source
client.ClickCoordinate(991, 460, 1);
VBScript Example Expand source
client.ClickCoordinate 991, 460, 1
Report
Python Example Expand source
self.client.clickCoordinate(991, 460, 1)
Perl Example Expand source
$client->clickCoordinate(991, 460, 1);