module AtspiAccessiblePatches
Utility monkey-patches for the Atspi::Accessible class
Public Instance Methods
each_child() { |child| ... }
click to toggle source
# File lib/atspi_app_driver.rb, line 10 def each_child child_count.times do |i| child = get_child_at_index i yield child if child end end
find_role(role, regex = //)
click to toggle source
# File lib/atspi_app_driver.rb, line 17 def find_role(role, regex = //) return self if role == self.role && name =~ regex each_child do |child| result = child.find_role role, regex return result if result end nil end
inspect_recursive(level = 0, maxlevel = 5)
click to toggle source
# File lib/atspi_app_driver.rb, line 27 def inspect_recursive(level = 0, maxlevel = 5) puts "#{' ' * level} > name: #{name}; role: #{role}" each_child do |child| child.inspect_recursive(level + 1) unless level >= maxlevel end end