Skip to content

Commit 2d8fc5f

Browse files
JaniJegoroffbootstraponline
authored andcommitted
Added touch id endpoint (#384)
1 parent 11b80e3 commit 2d8fc5f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/appium_lib/device/device.rb

+16
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ module Device
9393
# pull_folder '/data/local/tmp' #=> Get the folder at that path
9494
# ```
9595

96+
# @!method touch_id
97+
# iOS only; Simulate Touch ID with either valid (match == true) or invalid (match == false) fingerprint.
98+
# @param match (Boolean) fingerprint validity
99+
# Defaults to true.
100+
# ```ruby
101+
# touch_id true #=> Simulate valid fingerprint
102+
# touch_id false #=> Simulate invalid fingerprint
103+
# ```
104+
96105
# @!method end_coverage
97106
# Android only; Ends the test coverage and writes the results to the given path on device.
98107
# @param path (String) Path on the device to write too.
@@ -252,6 +261,13 @@ def pull_folder(path)
252261
end
253262
end
254263

264+
# TODO: TEST ME
265+
add_endpoint_method(:touch_id, 'session/:session_id/appium/simulator/touch_id') do
266+
def touch_id(match = true)
267+
execute :touch_id, {}, match: match
268+
end
269+
end
270+
255271
# TODO: TEST ME
256272
add_endpoint_method(:end_coverage, 'session/:session_id/appium/app/end_test_coverage') do
257273
def end_coverage(path, intent)

0 commit comments

Comments
 (0)