Method: AX::Element#type

Defined in:
lib/ax/element.rb

#type(string) ⇒ Boolean

Note:

As of OS X 10.9 (Sea Lion), it is no longer possible to send keyboard events directly to an element. What we have here is only an approximation.

Send keyboard events to the receiver.

Parameters:

  • string (String)

Returns:

  • (Boolean)


239
240
241
242
243
244
# File 'lib/ax/element.rb', line 239

def type string
  set_focus_to self unless focused?
  keyboard_events_for(string).each do |event|
    KeyCoder.post_event event
  end
end