Perform Touch ID
Simulate a touch id event (iOS Simulator only) //模拟触摸id事件(仅限iOS模拟器)
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 | // webdriver.io example driver.touchId(false); // Simulates a failed touch driver.touchId(true); // Simulates a passing touch // wd example await driver.touchId(false); // Simulates a failed touch await driver.touchId(true); // Simulates a failed touch |
Ruby | # ruby_lib example touch_id(false) touch_id(true) # ruby_lib_core example @driver.touch_id(false) # Simulates a failed touch @driver.touch_id(true) # Simulates a passing touch |
C# | driver.PerformTouchID(false); // Simulates a failed touch driver.PerformTouchID(true); // Simulates a passing touch |
PHP | // TODO PHP sample |
Description
To enable this feature, the allowTouchIdEnroll
desired capability must be set to true and the Simulator must be enrolled. //allow Touchldenroll所需功能设置为true
When you set allowTouchIdEnroll
to true, it will set the Simulator to be enrolled by default. The enrollment state can be toggled //此时可以默认注册
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 //只有在Appium进程或其父应用程序(例如。终端.app或者应用程序.app)可以在“系统首选项”>“安全与隐私”>“隐私”>“辅助功能列表”中访问Mac OS辅助功能
Finger Print by Android is here
Support
Appium Server
Platform | Driver | Platform Versions | Appium Version | Driver Version |
---|---|---|---|---|
iOS | XCUITest | 9.3+ | 1.6.0+ | All |
UIAutomation | None | None | None | |
Android | Espresso | None | None | None |
UiAutomator2 | None | None | None | |
UiAutomator | None | None | None | |
Mac | Mac | None | None | None |
Windows | Windows | None | None | None |
Appium Clients
Language | Support | Documentation |
---|---|---|
Java | All | appium.github.io |
Python | All | appium.github.io |
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/appium/simulator/touch_id
URL Parameters
name | description |
---|---|
session_id | ID of the session to route the command to |
JSON Parameters
name | type | description |
---|---|---|
match | boolean | Are we simulating a successful touch (true) or a failed touch (false) |
Response
null