mirror of
https://github.com/appium/appium.git
synced 2026-01-25 03:38:52 -06:00
Added device interactions commands (#9358)
This commit is contained in:
73
commands-yml/commands/device/keys/long-press-keycode.yml
Normal file
73
commands-yml/commands/device/keys/long-press-keycode.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
name: Long Press Key Code
|
||||
short_description: Press and hold a particular key code on the device
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.longPressKeyCode(10);
|
||||
python:
|
||||
|
|
||||
self.driver.long_press_keycode(10);
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.longPressKeyCode(10);
|
||||
ruby:
|
||||
|
|
||||
@driver.long_press_keycode(10)
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#longPressKeyCode-int-"
|
||||
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L431"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
|
||||
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode"
|
||||
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: false
|
||||
uiautomation: false
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: false # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: false # 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/appium/device/long_press_keycode
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
json_parameters:
|
||||
- name: keycode
|
||||
type: number
|
||||
description: \[Key code](http://developer.android.com/reference/android/view/KeyEvent.html) pressed on the device
|
||||
- name: metastate
|
||||
type: number
|
||||
description: Metastate for the keypress
|
||||
|
||||
# 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#L331
|
||||
73
commands-yml/commands/device/keys/press-keycode.yml
Normal file
73
commands-yml/commands/device/keys/press-keycode.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
name: Press Key Code
|
||||
short_description: Press a particular key on the device
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.pressKeyCode(10);
|
||||
python:
|
||||
|
|
||||
self.driver.press_keycode(10);
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.pressKeycode(10);
|
||||
ruby:
|
||||
|
|
||||
@driver.press_keycode(10)
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#pressKeyCode-int-"
|
||||
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L415"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
|
||||
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode"
|
||||
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: false
|
||||
uiautomation: false
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: false # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: false # 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/appium/device/press_keycode
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
json_parameters:
|
||||
- name: keycode
|
||||
type: number
|
||||
description: \[Key code](http://developer.android.com/reference/android/view/KeyEvent.html) pressed on the device
|
||||
- name: metastate
|
||||
type: number
|
||||
description: Metastate for the keypress
|
||||
|
||||
# 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#L328
|
||||
69
commands-yml/commands/device/lock/is-locked.yml
Normal file
69
commands-yml/commands/device/lock/is-locked.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
name: Is Device Locked
|
||||
short_description: Check whether the device is locked or not
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
boolean isLocked = driver.isLocked();
|
||||
javascript_wd:
|
||||
|
|
||||
let isLocked = await driver.isLocked();
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.isLocked();
|
||||
ruby:
|
||||
|
|
||||
@driver.device_locked()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#isLocked--"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/isLocked.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2407"
|
||||
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:device_locked%3F"
|
||||
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: false # 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/appium/device/is_locked
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
response:
|
||||
- type: boolean
|
||||
description: True if the device is locked, false if not
|
||||
|
||||
# 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#L313
|
||||
71
commands-yml/commands/device/lock/lock.yml
Normal file
71
commands-yml/commands/device/lock/lock.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
name: Lock
|
||||
short_description: Lock the device
|
||||
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.lockDevice();
|
||||
python:
|
||||
|
|
||||
self.driver.lock();
|
||||
javascript_wd:
|
||||
|
|
||||
await driver.lock();
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.lock();
|
||||
ruby:
|
||||
|
|
||||
@driver.lock()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#lockDevice--"
|
||||
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L643"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/lock.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2363"
|
||||
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L37"
|
||||
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: false
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: false # 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/appium/device/lock
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
|
||||
# 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#L307
|
||||
70
commands-yml/commands/device/lock/shake.yml
Normal file
70
commands-yml/commands/device/lock/shake.yml
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
name: Shake
|
||||
short_description: Perform a shake action on the device
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.shake();
|
||||
python:
|
||||
|
|
||||
self.driver.shake();
|
||||
javascript_wd:
|
||||
|
|
||||
await driver.shake();
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.shake();
|
||||
ruby:
|
||||
|
|
||||
@driver.shake()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/ios/ShakesDevice.html#shake--"
|
||||
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L655"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/shake.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2342"
|
||||
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:shake"
|
||||
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: false
|
||||
uiautomation: true
|
||||
android:
|
||||
uiautomator2: false
|
||||
uiautomator: false
|
||||
mac:
|
||||
mac: false # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: false # 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/appium/device/shake
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
|
||||
# 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#L292
|
||||
69
commands-yml/commands/device/lock/unlock.yml
Normal file
69
commands-yml/commands/device/lock/unlock.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
name: Unlock
|
||||
short_description: Unlock the device
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
driver.lockDevice();
|
||||
driver.unlockDevice();
|
||||
python:
|
||||
|
|
||||
self.driver.lock();
|
||||
self.driver.unlock();
|
||||
javascript_wd:
|
||||
|
|
||||
await driver.lock();
|
||||
await driver.unlock();
|
||||
|
||||
javascript_wdio:
|
||||
|
|
||||
driver.lock()
|
||||
.unlock();
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/android/UnlocksAndroidDevice.html#unlockDevice--"
|
||||
javascript_wdio: "http://webdriver.io/api/mobile/unlock.html"
|
||||
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2386"
|
||||
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: false # 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/appium/device/unlock
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
|
||||
# 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#L310
|
||||
70
commands-yml/commands/device/other/get-performance-data.yml
Normal file
70
commands-yml/commands/device/other/get-performance-data.yml
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
name: Get Performance Data
|
||||
short_description: Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
List<String> performanceTypes = driver.getSupportedPerformanceDataTypes();
|
||||
ruby:
|
||||
|
|
||||
@driver.get_performance_data()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--"
|
||||
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L59"
|
||||
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: false
|
||||
uiautomation: false
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: false # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: false # 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/appium/getPerformanceData
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
json_parameters:
|
||||
- name: package_name
|
||||
type: string
|
||||
description: The package name of the application
|
||||
- name: data_type
|
||||
type: string
|
||||
description: The type of system state which wants to read. It should be one of the supported performance data types.
|
||||
- name: data_read_timeout
|
||||
type: number
|
||||
description: The number of attempts to read (optional)
|
||||
response:
|
||||
- type: array<string>
|
||||
description: The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery
|
||||
|
||||
# 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#L322
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
name: Get Performance Data Types
|
||||
short_description: Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
List<String> performanceTypes = driver.getSupportedPerformanceDataTypes();
|
||||
ruby:
|
||||
|
|
||||
@driver.get_performance_data_types()
|
||||
php:
|
||||
|
|
||||
// TODO PHP sample
|
||||
csharp:
|
||||
|
|
||||
// TODO C# sample
|
||||
|
||||
client_docs:
|
||||
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--"
|
||||
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:get_performance_data_types"
|
||||
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: false
|
||||
uiautomation: false
|
||||
android:
|
||||
uiautomator2: true
|
||||
uiautomator: true
|
||||
mac:
|
||||
mac: false # TODO Confirm this that mouse movements
|
||||
windows:
|
||||
windows: false # 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/appium/performanceData/types
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
description: ID of the session to route the command to
|
||||
response:
|
||||
- type: array<string>
|
||||
description: The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo)
|
||||
|
||||
# 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#L322
|
||||
@@ -1,30 +1,46 @@
|
||||
---
|
||||
name: Touch Perform
|
||||
name: Multi Touch Perform
|
||||
short_description: Perform a multi touch action sequence
|
||||
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
MultiTouchAction action = new MultiTouchAction(driver);
|
||||
action.down(10, 10);
|
||||
action.moveTo(10, 100);
|
||||
action.up(20, 20);
|
||||
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:
|
||||
|
|
||||
actions = MultiTouchAction(driver)
|
||||
actions.tap_and_hold(20, 20)
|
||||
actions.move_to(10, 100)
|
||||
actions.release(50, 50)
|
||||
actions.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()
|
||||
javascript_wd:
|
||||
|
|
||||
let action = new wd.MultiTouchAction();
|
||||
action.press({x: 10, y: 10});
|
||||
action.moveTo({x: 10, y: 100});
|
||||
action.release({x: 20, y: 20});
|
||||
action.perform();
|
||||
action.release();
|
||||
await driver.performMultiTouchAction(action);
|
||||
|
||||
javascript_wdio:
|
||||
@@ -77,7 +93,7 @@ client_support:
|
||||
|
||||
# Information about the HTTP endpoints
|
||||
endpoint:
|
||||
url: /session/:session_id/touch/perform
|
||||
url: /session/:session_id/touch/multi/perform
|
||||
method: POST
|
||||
url_parameters:
|
||||
- name: session_id
|
||||
@@ -99,7 +115,8 @@ endpoint:
|
||||
type: number
|
||||
description: The Y coordinate of the operation (relative to top left corner)
|
||||
- name: opts.count
|
||||
type: count
|
||||
type: number
|
||||
description: Tap count
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
|
||||
@@ -4,7 +4,7 @@ short_description: Perform a touch action sequence
|
||||
|
||||
description:
|
||||
|
|
||||
This functionality is only available from within a mobile context
|
||||
This functionality is only available from within a native context
|
||||
|
||||
'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one
|
||||
command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch
|
||||
@@ -14,24 +14,26 @@ description:
|
||||
example_usage:
|
||||
java:
|
||||
|
|
||||
TouchActions action = new TouchActions(driver);
|
||||
action.down(10, 10);
|
||||
TouchAction action = new TouchAction(driver);
|
||||
action.press(10, 10);
|
||||
action.moveTo(10, 100);
|
||||
action.up(20, 20);
|
||||
action.release();
|
||||
action.perform();
|
||||
python:
|
||||
|
|
||||
actions = TouchActions(driver)
|
||||
from appium.webdriver.common.touch_action import TouchAction
|
||||
|
||||
actions = TouchAction(driver)
|
||||
actions.tap_and_hold(20, 20)
|
||||
actions.move_to(10, 100)
|
||||
actions.release(50, 50)
|
||||
actions.release()
|
||||
actions.perform()
|
||||
javascript_wd:
|
||||
|
|
||||
let action = new wd.TouchAction();
|
||||
action.press({x: 10, y: 10});
|
||||
action.moveTo({x: 10, y: 100});
|
||||
action.release({x: 20, y: 20});
|
||||
action.release();
|
||||
action.perform();
|
||||
await driver.performTouchAction(action);
|
||||
|
||||
@@ -107,7 +109,8 @@ endpoint:
|
||||
type: number
|
||||
description: The Y coordinate of the operation (relative to top left corner)
|
||||
- name: opts.count
|
||||
type: count
|
||||
type: number
|
||||
description: Tap count
|
||||
|
||||
# Links to specifications. Should link to at least one specification
|
||||
specifications:
|
||||
|
||||
105
docs/en/commands/device/lock/is-locked.md
Normal file
105
docs/en/commands/device/lock/is-locked.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Is Device Locked
|
||||
|
||||
Check whether the device is locked or not
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
boolean isLocked = driver.isLocked();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Not supported
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.isLocked();
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
let isLocked = await driver.isLocked();
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.device_locked()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#isLocked--)
|
||||
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/mobile/isLocked.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L2407)
|
||||
* [Ruby](http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:device_locked%3F)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/device/is_locked`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
True if the device is locked, false if not (boolean)
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L313)
|
||||
107
docs/en/commands/device/lock/lock.md
Normal file
107
docs/en/commands/device/lock/lock.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Lock
|
||||
|
||||
Lock the device
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
driver.lockDevice();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
self.driver.lock();
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.lock();
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
await driver.lock();
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.lock()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#lockDevice--)
|
||||
* [Python](https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L643)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/mobile/lock.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L2363)
|
||||
* [Ruby](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L37)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/device/lock`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L307)
|
||||
116
docs/en/commands/device/lock/shake.md
Normal file
116
docs/en/commands/device/lock/shake.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Shake
|
||||
|
||||
Perform a shake action on the device
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
driver.shake();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
self.driver.shake();
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.shake();
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
await driver.shake();
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.shake()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
This functionality is only available from within a mobile context
|
||||
|
||||
'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one
|
||||
command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch
|
||||
interactions impossible because some interactions need to be performed in one sequence. Vertical, for example, requires pressing down, moving to a different
|
||||
y coordinate, and then releasing. For it to work, there can't be a delay between the interactions.
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/ios/ShakesDevice.html#shake--)
|
||||
* [Python](https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L655)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/mobile/shake.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L2342)
|
||||
* [Ruby](http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:shake)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/device/shake`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L292)
|
||||
109
docs/en/commands/device/lock/unlock.md
Normal file
109
docs/en/commands/device/lock/unlock.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# Unlock
|
||||
|
||||
Unlock the device
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
driver.lock();
|
||||
driver.unlockDevice();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
self.driver.lock();
|
||||
self.driver.unlock();
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.lock()
|
||||
.unlock();
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
await driver.lock();
|
||||
await driver.unlock();
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Not supported
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/android/UnlocksAndroidDevice.html#unlockDevice--)
|
||||
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/mobile/unlock.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L2386)
|
||||
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/device/unlock`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L310)
|
||||
104
docs/en/commands/device/other/get-performance-data.md
Normal file
104
docs/en/commands/device/other/get-performance-data.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# Get Performance Data
|
||||
|
||||
Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
List<String> performanceTypes = driver.getSupportedPerformanceDataTypes;
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Not supported
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Not supported
|
||||
|
||||
|
||||
// Not supported
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.get_performance_data()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--)
|
||||
|
||||
|
||||
|
||||
* [Ruby](https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L59)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/getPerformanceData`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
|name|type|description|
|
||||
|----|----|-----------|
|
||||
| package_name | string | The package name of the application |
|
||||
| data_type | string | The type of system state which wants to read. It should be one of the supported performance data types. |
|
||||
| data_read_timeout | number | The number of attempts to read |
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L322)
|
||||
100
docs/en/commands/device/other/performance-data-types.md
Normal file
100
docs/en/commands/device/other/performance-data-types.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Get Performance Data Types
|
||||
|
||||
Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
List<String> performanceTypes = driver.getSupportedPerformanceDataTypes;
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Not supported
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Not supported
|
||||
|
||||
|
||||
// Not supported
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.get_performance_data_types()
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--)
|
||||
|
||||
|
||||
|
||||
* [Ruby](http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:get_performance_data_types)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/appium/performanceData/types`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
None
|
||||
|
||||
### Response
|
||||
|
||||
The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo) (array<string>)
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L322)
|
||||
128
docs/en/commands/interactions/touch/move.md
Normal file
128
docs/en/commands/interactions/touch/move.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# Tap
|
||||
|
||||
Finger move on the screen
|
||||
## Example Usage
|
||||
|
||||
```java
|
||||
// Java
|
||||
TouchActions action = new TouchActions(driver);
|
||||
action.down(10, 10);
|
||||
action.move(50, 50);
|
||||
action.perform();
|
||||
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
actions = TouchActions(driver)
|
||||
actions.tap_and_hold(element)
|
||||
actions.move(50, 50)
|
||||
actions.perform()
|
||||
|
||||
```
|
||||
|
||||
```javascript
|
||||
// Javascript
|
||||
// webdriver.io example
|
||||
driver.touchPerform([
|
||||
{ action: 'press', options: { x: 100, y: 250 }},
|
||||
{ action: 'moveTo', options: { x: 300, y: 100 }},
|
||||
{ action: 'release' }
|
||||
]);
|
||||
|
||||
|
||||
|
||||
// wd example
|
||||
// Using tapElement method
|
||||
await driver.tapElement(elementOne);
|
||||
|
||||
// Using touch actions
|
||||
let action = new wd.TouchAction();
|
||||
action.press({x: 10, y: 10});
|
||||
action.moveTo({x: 50, y: 50});
|
||||
action.perform();
|
||||
await driver.performTouchAction(action);
|
||||
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Ruby
|
||||
@driver.touch_action.down(element).move().perform
|
||||
|
||||
```
|
||||
|
||||
```php
|
||||
# PHP
|
||||
// TODO PHP sample
|
||||
|
||||
```
|
||||
|
||||
```csharp
|
||||
// C#
|
||||
// TODO C# sample
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Client Docs
|
||||
|
||||
* [Java](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#down-int-int-)
|
||||
* [Python](https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.move)
|
||||
* [Javascript (WebdriverIO)](http://webdriver.io/api/mobile/touchPerform.html)
|
||||
* [Javascript (WD)](https://github.com/admc/wd/blob/master/lib/commands.js#L1531)
|
||||
* [Ruby](http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:move)
|
||||
* [PHP](https://github.com/appium/php-client/)
|
||||
* [C#](https://github.com/appium/appium-dotnet-driver/)
|
||||
|
||||
## Support
|
||||
|
||||
### Appium Server
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | 8.0 to 9.3 | All | All |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | 10+ | 1.6.0+ | All |
|
||||
|
||||
### Appium Clients
|
||||
|
||||
|Language|Support|
|
||||
|--------|-------|
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All |
|
||||
|[PHP](https://github.com/appium/php-client/releases/latest)| All |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| All |
|
||||
|
||||
## HTTP API Specifications
|
||||
|
||||
### Endpoint
|
||||
|
||||
`POST /session/:session_id/touch/move`
|
||||
|
||||
### URL Parameters
|
||||
|
||||
|name|description|
|
||||
|----|-----------|
|
||||
|session_id|ID of the session to route the command to|
|
||||
|
||||
### JSON Parameters
|
||||
|
||||
|name|type|description|
|
||||
|----|----|-----------|
|
||||
| x | number | X coordinate on the screen |
|
||||
| y | number | Y coordinate on the screen |
|
||||
|
||||
### Response
|
||||
|
||||
null
|
||||
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchmove)
|
||||
32
docs/toc.js
32
docs/toc.js
@@ -37,6 +37,38 @@ module.exports = {
|
||||
["Get Log Types", "get-log-types.md"],
|
||||
]],
|
||||
]],
|
||||
["Session", ["session",
|
||||
["Create", "create.md"],
|
||||
["Delete", "delete.md"],
|
||||
["Get Session Capabilities", "get.md"],
|
||||
["Go Back", "back.md"],
|
||||
["Screenshot", "screenshot.md"],
|
||||
["Timeouts", ["timeouts",
|
||||
["Timeout", "timeout.md"],
|
||||
["Implicit Wait", "implicit-wait.md"],
|
||||
["Async Script", "async-script.md"],
|
||||
]],
|
||||
["Other", ["other",
|
||||
["Get Orientation", "get-orientation.md"],
|
||||
["Set Orientation", "set-orientation.md"],
|
||||
["Get Geolocation", "get-geolocation.md"],
|
||||
["Set Geolocation", "set-orientation.md"],
|
||||
["Get Logs", "get-log.md"],
|
||||
["Get Log Types", "get-log-types.md"],
|
||||
]],
|
||||
["Device", ["devices",
|
||||
["Interactions", ["interactions",
|
||||
["Shake", "shake.md"],
|
||||
["Lock", "lock.md"],
|
||||
["Unlock", "unlock.md"],
|
||||
["Is Locked", "is-locked.md"],
|
||||
]],
|
||||
["Other", ["other",
|
||||
["Get Performance Data", "get-performance-data.md"],
|
||||
["Performance Data Types", "performance-data-types.md"],
|
||||
]],
|
||||
]],
|
||||
]],
|
||||
["Element", ["element",
|
||||
["Find Element", "find-element.md"],
|
||||
["Find Elements", "find-elements.md"],
|
||||
|
||||
Reference in New Issue
Block a user