Method: Mani::Window#type

Defined in:
lib/mani/window.rb

#type(text, options = {}) ⇒ Object

Types the supplied text into the current window.

Parameters:

  • text (String)

    The text

  • options (Hash) (defaults to: {})

    The options

    • :delay (Numeric) Optional The amount of time, in seconds, to delay after typing the text (defaults to 0.5)



78
79
80
81
82
83
# File 'lib/mani/window.rb', line 78

def type(text, options = {})
  @windowing_system.focus_window @pid
  @windowing_system.type_combination text

  sleep options[:delay] || 0.5
end