diff --git a/ios_tests/lib/ios/specs/common/command.rb b/ios_tests/lib/ios/specs/common/command.rb index 2f79f791..367419ef 100644 --- a/ios_tests/lib/ios/specs/common/command.rb +++ b/ios_tests/lib/ios/specs/common/command.rb @@ -36,6 +36,7 @@ def before_first Selenium::WebDriver::Remote::Bridge.method_defined?(:pull_file).must_equal true Selenium::WebDriver::Remote::Bridge.method_defined?(:pull_folder).must_equal true Selenium::WebDriver::Remote::Bridge.method_defined?(:touch_id).must_equal true + Selenium::WebDriver::Remote::Bridge.method_defined?(:toggle_touch_id_enrollment).must_equal true Selenium::WebDriver::Remote::Bridge.method_defined?(:get_settings).must_equal true Selenium::WebDriver::Remote::Bridge.method_defined?(:update_settings).must_equal true Selenium::WebDriver::Remote::Bridge.method_defined?(:touch_actions).must_equal true diff --git a/lib/appium_lib/common/command.rb b/lib/appium_lib/common/command.rb index 20694eba..58724630 100644 --- a/lib/appium_lib/common/command.rb +++ b/lib/appium_lib/common/command.rb @@ -53,7 +53,8 @@ module Commands get_performance_data: [:post, 'session/:session_id/appium/getPerformanceData'.freeze], # iOS - touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'.freeze] + touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'.freeze], + toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment'.freeze] }.merge(COMMAND_NO_ARG).merge(::Selenium::WebDriver::Remote::Bridge::COMMANDS).freeze end end diff --git a/lib/appium_lib/device/device.rb b/lib/appium_lib/device/device.rb index 66861044..b45035c7 100644 --- a/lib/appium_lib/device/device.rb +++ b/lib/appium_lib/device/device.rb @@ -114,6 +114,9 @@ module Device # touch_id false #=> Simulate invalid fingerprint # ``` + # @!method toggle_touch_id_enrollment + # iOS Simulator only: Toggle touch id enrollment on an iOS Simulator. + # @!method end_coverage # Android only; Ends the test coverage and writes the results to the given path on device. # @param [String] path Path on the device to write too. @@ -339,6 +342,13 @@ def touch_id(match = true) end end + # TODO: TEST ME + add_endpoint_method(:toggle_touch_id_enrollment) do + def toggle_touch_id_enrollment + execute :toggle_touch_id_enrollment, {} + end + end + # TODO: TEST ME add_endpoint_method(:end_coverage) do def end_coverage(path, intent)