Legacy | Application.Element.MultiTap
-
Command: application.element
-
Subcommand: multiTap
-
Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium
All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.
-
Supported OS: iOS (version 10.3 or later configured for the XCUITest framework)
Description
Uses an element identifier (XPath or specific attribute) to search for the element in the display of the active window and then sends one or more taps with one or more touch points on the element. Used in conjunction with either the Perfecto or Appium framework to interpret the element classes.
Parameters
Name | Values | Default | Description |
---|---|---|---|
deviceId* |
|
|
The device for this command. |
value* |
|
|
The object identifier. By default, an Xpath is generated by the object spy. Use the By parameter to specify another identification method. |
by | xpath (XPath) className (Class) linkText (Text) partialLinkText (Partial text) name (Name) id (Id) accessibilityId (Accessibility id) uiAutomator (UIAutomator Selector) uiAutomation (UIAutomation Selector) cacheId (Class Chain) predicate () classChain () |
XPath | Specifies the identification method. Xpath Class Text |
timeout |
|
0 | The time, in seconds, to wait for the element to appear on the screen or the web page. |
framework | appium-1.3.4 (Appium) perfectoMobile (PerfectoMobile) |
PerfectoMobile | The automation framework. PerfectoMobile (default) Appium |
number of taps |
|
1 | The number of taps. |
number of touches |
|
1 | The number of touch points (number of fingers). |
* Mandatory parameter
Request &Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-12-07_08_30_54_151?operation=command&securityToken=<your_token>&command=application.element&subcommand=multiTap¶m.deviceId=570E7512¶m.by=id¶m.value=okBtn¶m.numberOfTaps=3¶m.numberOfTouches=2
JSON response
{
"reason":"Success",
"timer.elapsed":"578",
"testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-12-07_08_30_54_151",
"description":"Success",
"timer.system":"15",
"completed":"true",
"flowEndCode":"SUCCEEDED",
"executionId":"john@perfectomobile.com_controller_16-12-07_08_30_54_151",
"timer.ux":"563",
"singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml&ownerId=john@perfectomobile.com&sharingCode=a8d8ba68-ee11-4594-a83a-2eca62034d2c",
"reportKey":"PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml",
"timer.device":"563"}
Example
Java sample
Map<String, Object> param = new HashMap<>();
param.put("selector", "//*[@label=\"Please select your region\"]");
param.put("by", "xpath");
param.put("numberOfTaps", "3");
param.put("numberOfTouches", "2");
driver.executeScript("mobile:application.element:multiTap", param);