Edit this Doc Multi Touch Perform

Perform a multi touch action sequence

Example Usage

TouchActions actionOne = new TouchAction();
actionOne.press(10, 10);
actionOne.moveTo(10, 100);
actionOne.release();
TouchActions actionTwo = new TouchAction();
actionTwo.press(20, 20);
actionTwo.moveTo(20, 200);
actionTwo.release();
MultiTouchAction action = new MultiTouchAction();
action.add(actionOne);
action.add(actionTwo);
action.perform();

from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.common.multi_action import MultiAction
# ...
a1 = TouchAction()
a1.press(10, 20)
a1.move_to(10, 200)
a1.release()

a2 = TouchAction()
a2.press(10, 10)
a2.move_to(10, 100)
a2.release()

ma = MultiAction(self.driver)
ma.add(a1, a2)
ma.perform()

// webdriver.io example
driver.touchMultiPerform([
  { action: 'press', options: { x: 100, y: 250 }},
  { action: 'moveTo', options: { x: 300, y: 100 }},
  { action: 'release' }
]);

// wd example
let action = new wd.MultiTouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
await action.perform();

# ruby_lib example
multi_touch.down(element).move_to(10, 100).up(50, 50).perform

# ruby_lib_core example
@driver.multi_touch.down(element).move_to(10, 100).up(50, 50).perform

// TODO C# sample

// TODO PHP sample

Support

Appium Server

Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest 9.3+ 1.6.0+ All
UIAutomation 8.0 to 9.3 All All
Android Espresso ?+ 1.9.0+ All
UiAutomator2 ?+ 1.6.0+ All
UiAutomator 4.2+ All All
Mac Mac ?+ 1.6.4+ All
Windows Windows 10+ 1.6.0+ All

Appium Clients

Language Support Documentation
Java All appium.github.io
Python All github.com
Javascript (WebdriverIO) All
Javascript (WD) All github.com
Ruby All www.rubydoc.info
PHP All github.com
C# All github.com

HTTP API Specifications

Endpoint

POST /session/:session_id/touch/multi/perform

URL Parameters

name description
session_id ID of the session to route the command to

JSON Parameters

name type description
action string The type of action to perform (moveTo|release|press|tap|wait)
options object The parameters of the action
opts.element string The ID of the element
opts.x number The X coordinate of the operation (relative to top left corner)
opts.y number The Y coordinate of the operation (relative to top left corner)
opts.count number Tap count

Response

null

See Also