Sha256: e04a25cb39871b4c755e39b9eeea0d159ee9812b1385884202468ad565aa265b

Contents?: true

Size: 839 Bytes

Versions: 3

Compression:

Stored size: 839 Bytes

Contents

module Appium
  module Core
    module Device
      module Keyboard
        def self.add_methods
          ::Appium::Core::Device.add_endpoint_method(:hide_keyboard) do
            def hide_keyboard(close_key = nil, strategy = nil)
              option = {}

              option[:key] = close_key || 'Done'        # default to Done key.
              option[:strategy] = strategy || :pressKey # default to pressKey

              execute :hide_keyboard, {}, option
            end
          end

          ::Appium::Core::Device.add_endpoint_method(:is_keyboard_shown) do
            def is_keyboard_shown # rubocop:disable Naming/PredicateName for compatibility
              execute :is_keyboard_shown
            end
          end
        end
      end # module Keyboard
    end # module Device
  end # module Core
end # module Appium

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appium_lib_core-1.7.2 lib/appium_lib_core/device/keyboard.rb
appium_lib_core-1.7.1 lib/appium_lib_core/device/keyboard.rb
appium_lib_core-1.7.0 lib/appium_lib_core/device/keyboard.rb