LongClick
Description
Long click on or near an element or text (the proximity to the element/text is specified by an X-Y offset)
Parameters
Name | Value | Description |
---|---|---|
Zone | String with one of the following values * NATIVE * WEB * TEXT | Zones which define the way the element will be identified. |
Element | String | Identification of Element in the device screen. |
Element to find index | Integer | Element to find index |
Click Count | Integer | Number of clicks |
Horizontal Offset | Integer | Horizontal Offset from the Element in screen pixels |
Horizontal Offset | Integer | Vertical Offset from the Element in screen pixels |
Usage
Designed command for longer click operations (click duration is 2000 milliseconds)
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Example
LongClick
DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "<deviceid>");
...
...
// This command will look for the EriBank application in device screen at the moment and long click once.
seetest.longClick("NATIVE", "//*[@text='EriBank']", 0, 1, 0, 0);