Module: Appium::Core::Base::Device::Keyboard

Includes:
_Bridge
Included in:
Bridge
Defined in:
lib/appium_lib_core/common/device/keyboard.rb,
sig/lib/appium_lib_core/common/device/keyboard.rbs

Instance Method Summary collapse

Methods included from _Bridge

#bridge, #execute, #execute_async_script, #execute_script

Instance Method Details

#hide_keyboard(close_key = nil) ⇒ Object

Parameters:

  • close_key (Object, nil) (defaults to: nil)

Returns:

  • (Object)


20
21
22
23
24
25
26
# File 'lib/appium_lib_core/common/device/keyboard.rb', line 20

def hide_keyboard(close_key = nil)
  option = {} # steep:ignore

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

  execute_script 'mobile:hideKeyboard', option
end

#is_keyboard_shownObject

rubocop:disable Naming/PredicatePrefix

Returns:

  • (Object)


28
29
30
# File 'lib/appium_lib_core/common/device/keyboard.rb', line 28

def is_keyboard_shown # rubocop:disable Naming/PredicatePrefix
  execute_script 'mobile:isKeyboardShown', {}
end