SeeTestAutomation - LongClick
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 longClick (Zone, Element, Index, ClickCount, X, Y)
Description
Long click on or near an element or text (the proximity to the element/text is specified by an X-Y offset)
Parameters
- SeeTestAutomation - Zone: Select Zone
- SeeTestAutomation - Element: Select Element
- SeeTestAutomation - Index: Element Index
- Click Count: Number of Clicks
- 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)
Usage
Designed command for longer click operations (click duration is 2000 milliseconds)
Scenario: In the following example we will use the longClick command to press the "EriBank" icon on iOS springboard in order to delete/move it.
Parameters:
- Zone: Set to be Native (using the non instrumentation feature - link)
- Element: Query: xpath=//*[@text='EriBank']
- Index: Set to be 0
- Click count: Set to be 1
- X: Set to 0
- Y: Set to 0 p>
Code Examples
Java Example
client.longClick("default", "EriBank", 0, 1, 0, 0);
C# Example Expand source
client.LongClick("default", "EriBank", 0, 1, 0, 0);
VBScript Example Expand source
client.LongClick "default", "EriBank", 0, 1, 0, 0
Report
Python Example Expand source
self.client.longClick("default", "EriBank", 0, 1, 0, 0)
Perl Example Expand source
$client->longClick("default", "EriBank", 0, 1, 0, 0);