Touch id commands
ADD
commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml
+---
+name: Toggle Touch ID Enrollment
+short_description: Toggle the simulator being [enrolled](https://support.apple.com/en-ca/ht201371) to accept touchId (iOS Simulator only)
+
+description:
+ |
+ To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true. When `allowTouchIdEnroll` is set to true
+ the Simulator will be enrolled by default, and the 'Toggle Touch ID Enrollment' changes the enrollment state.
+
+ This call will only work if the Appium process or its parent application (e.g., Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list
+
+example_usage:
+ java:
+ |
+ driver.toggleTouchIDEnrollment(true);
+ python:
+ |
+ self.driver.toggle_touch_id_enrollment()
+ javascript_wd:
+ |
+ await driver.toggleTouchIdEnrollment();
+ javascript_wdio:
+ |
+ driver.toggleTouchIdEnrollment(true);
+ ruby:
+ |
+ @driver.toggle_touch_id_enrollment()
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "http://appium.github.io/java-client/io/appium/java_client/ios/PerformsTouchID.html#performTouchID-boolean-"
+ python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L670"
+ javascript_wdio: "http://webdriver.io/api/mobile/toggleTouchIdEnrollment.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3150"
+ ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L64"
+ 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: false
+ android:
+ uiautomator2: false
+ uiautomator: false
+ mac:
+ mac: false
+ windows:
+ windows: false
+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/simulator/toggle_touch_id_enrollment
+ method: 'POST'
+ json_parameters:
+ - name: enabled
+ type: boolean
+ description: If true, enable, if falsey disable, otherwise toggle (optional)
+
+# 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#L424

ADD
commands-yml/commands/device/simulator/touch-id.yml
+---
+name: Perform Touch ID
+short_description: Simulate a [touch id](https://support.apple.com/en-ca/ht201371) event (iOS Simulator only)
+description:
+ |
+ To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true and the Simulator
+ must be [enrolled](https://support.apple.com/en-ca/ht201371).
+
+ When you set `allowTouchIdEnroll` to true, it will set the Simulator to be enrolled by default.
+ The enrollment state can be [toggled](/docs/en/commands/simulator/toggle-touch-id-enrollment)
+
+ This call will only work if Appium process or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list
+
+
+example_usage:
+ java:
+ |
+ driver.performTouchID(false); // Simulates a failed touch
+ driver.performTouchID(true); // Simulates a passing touch
+ python:
+ |
+ self.driver.touch_id(false); # Simulates a failed touch
+ self.driver.touch_id(true); # Simulates a passing touch
+ javascript_wd:
+ |
+ await driver.touchId(false); // Simulates a failed touch
+ await driver.touchId(true); // Simulates a failed touch
+ javascript_wdio:
+ |
+ driver.touchId(false); // Simulates a failed touch
+ driver.touchId(true); // Simulates a passing touch
+ ruby:
+ |
+ @driver.touch_id(false) # Simulates a failed touch
+ @driver.touch_id(true) # Simulates a passing touch
+ php:
+ |
+ // TODO PHP sample
+ csharp:
+ |
+ // TODO C# sample
+
+client_docs:
+ java: "http://appium.github.io/java-client/io/appium/java_client/ios/PerformsTouchID.html#performTouchID-boolean-"
+ python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L661"
+ javascript_wdio: "http://webdriver.io/api/mobile/touchId.html"
+ javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3133"
+ ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Ios/Device:touch_id"
+ 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: false
+ android:
+ uiautomator2: false
+ uiautomator: false
+ mac:
+ mac: false
+ windows:
+ windows: false
+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/simulator/touch_id
+ method: 'POST'
+ json_parameters:
+ - name: match
+ type: boolean
+ description: Are we simulating a successful touch (true) or a failed touch (false)
+
+# 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#L424
+
+links:
+ - name: Appium Docs
+ url: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/touch-id.md
\ No newline at end of file

MODIFY
docs/toc.js
docs/toc.js
@@ -164,21 +164,14 @@ module.exports = {
["Remove App", "remove-app.md"],
["Is App Installed", "is-app-installed.md"]
]],
- ["Files", ["files",
- ["Push File", "push-file.md"],
- ["Pull File", "pull-file.md"],
- ["Pull Folder", "pull-folder.md"],
- ]],
- ["Other", ["other",
- ["Rotate", "rotate.md"],
- ["Current Activity", "current-activity.md"],
- ["Current Package", "current-package.md"],
- ["Start Activity", "start-activity.md"],
- ]],
["Keys", ["keys",
["Hide Keyboard", "hide-keyboard.md"],
["Is Keyboard Shown", "is-keyboard-shown.md"],
]],
+ ["Simulator", ["simulator",
+ ["Perform Touch ID", "touch-id.md"],
+ ["Toggle Touch ID Enrollment", "toggle-touch-id-enrollment.md"],
+ ]],
["Network", ["network",
["Toggle Airplane Mode", "toggle-airplane-mode.md"],
["Toggle Data", "toggle-data.md"],
@@ -194,6 +187,17 @@ module.exports = {
["System Bars", "system-bars.md"],
["System Time", "system-time.md"],
]],
+ ["Files", ["files",
+ ["Push File", "push-file.md"],
+ ["Pull File", "pull-file.md"],
+ ["Pull Folder", "pull-folder.md"],
+ ]],
+ ["Other", ["other",
+ ["Rotate", "rotate.md"],
+ ["Current Activity", "current-activity.md"],
+ ["Current Package", "current-package.md"],
+ ["Start Activity", "start-activity.md"],
+ ]],
]]
]],
["Writing & Running Tests", ["writing-running-appium",

Touch id commands (#9382)