Module: Appium::Core::Ios::Device

Extended by:
Forwardable
Defined in:
lib/appium_lib_core/ios/device.rb,
lib/appium_lib_core/ios/device/clipboard.rb

Defined Under Namespace

Modules: Clipboard

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(_mod) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/appium_lib_core/ios/device.rb', line 59

def extended(_mod)
  ::Appium::Core::Device.extend_webdriver_with_forwardable

  ::Appium::Core::Device.add_endpoint_method(:touch_id) do
    def touch_id(match = true)
      execute :touch_id, {}, match: match
    end
  end

  ::Appium::Core::Device.add_endpoint_method(:toggle_touch_id_enrollment) do
    def toggle_touch_id_enrollment(enabled = true)
      execute :toggle_touch_id_enrollment, {}, enabled: enabled
    end
  end

  Clipboard.add_methods
end

Instance Method Details

#get_clipboard(content_type: :plaintext) ⇒ Object

Set the content of device's clipboard.



# File 'lib/appium_lib_core/ios/device.rb', line 34

#set_clipboard(content: , content_type: :plaintext) ⇒ Object

Set the content of device's clipboard.



# File 'lib/appium_lib_core/ios/device.rb', line 44

#toggle_touch_id_enrollment(enabled = true) ⇒ String

An instance method of Appium::Core::Device . Toggle touch id enrollment on an iOS Simulator.

Examples:


@driver.toggle_touch_id_enrollment       #=> Enable toggle enrolled
@driver.toggle_touch_id_enrollment true  #=> Enable toggle enrolled
@driver.toggle_touch_id_enrollment false #=> Disable toggle enrolled

Parameters:

  • enabled (Boolean) (defaults to: true)

    Enable toggle touch id enrollment. Set true by default.

Returns:

  • (String)


# File 'lib/appium_lib_core/ios/device.rb', line 21

#touch_id(match = true) ⇒ String

An instance method of Appium::Core::Device . Simulate Touch ID with either valid (match == true) or invalid (match == false) fingerprint.

Examples:


@driver.touch_id true #=> Simulate valid fingerprint
@driver.touch_id false #=> Simulate invalid fingerprint

Parameters:

  • match (Boolean) (defaults to: true)

    fingerprint validity. Defaults to true.

Returns:

  • (String)


# File 'lib/appium_lib_core/ios/device.rb', line 9