UNPKG

appium

Version:
124 lines (114 loc) 3.59 kB
--- name: Multi Touch Perform short_description: Perform a multi touch action sequence example_usage: java: | TouchAction actionOne = new TouchAction(); actionOne.press(10, 10); actionOne.moveTo(10, 100); actionOne.release(); TouchAction 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(); python: | 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() javascript_wd: | let action = new wd.MultiTouchAction(); action.press({x: 10, y: 10}); action.moveTo({x: 10, y: 100}); action.release(); await driver.performMultiTouchAction(action); javascript_wdio: | driver.touchMultiPerform([ { action: 'press', options: { x: 100, y: 250 }}, { action: 'moveTo', options: { x: 300, y: 100 }}, { action: 'release' } ]); ruby: | @driver.multi_touch.down(element).move_to(10, 100).up(50, 50).perform php: | // TODO PHP sample csharp: | // TODO C# sample client_docs: java: "http://appium.github.io/java-client/io/appium/java_client/MultiTouchAction.html" python: "https://github.com/appium/python-client/blob/master/appium/webdriver/common/multi_action.py" javascript_wdio: "http://webdriver.io/api/mobile/touchMultiPerform.html" javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1546" ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/MultiTouch" php: "https://github.com/appium/php-client/" # TODO PHP documentation link csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link # Driver support by platform driver_support: ios: xcuitest: true uiautomation: true android: uiautomator2: true uiautomator: true mac: mac: true # TODO Confirm this that mouse movements windows: windows: true # TODO Confirm this client_support: java: true python: true ruby: true php: true csharp: true javascript_wd: true javascript_wdio: true # Information about the HTTP endpoints endpoint: url: /session/:session_id/touch/multi/perform method: POST url_parameters: - name: session_id description: ID of the session to route the command to json_parameters: - name: action type: string description: The type of action to perform (moveTo|release|press|tap|wait) - name: options type: object description: The parameters of the action - name: opts.element type: string description: The ID of the element - name: opts.x type: number description: The X coordinate of the operation (relative to top left corner) - name: opts.y type: number description: The Y coordinate of the operation (relative to top left corner) - name: opts.count type: number description: Tap count # Links to specifications. Should link to at least one specification specifications: jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L295