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



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/appium_lib_core/ios/device.rb', line 73

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 48

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

Set the content of device’s clipboard.



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

#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 35

#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 23