Class: RAutomation::Adapter::MsUia::Table
Instance Method Summary
collapse
Methods inherited from Control
#assert_enabled, #bounding_rectangle, #cached_hwnd, #click, #collapse, #control_class, #control_name, #disabled?, #enabled?, #expand, #focus, #focused?, #get_current_control_type, #help_text, #hwnd, #initialize, #matches_type?, #new_pid, #search_information, #visible?
Instance Method Details
#exist? ⇒ Boolean
Also known as:
exists?
115
116
117
|
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 115
def exist?
super && of_type_table?
end
|
#of_type_table? ⇒ Boolean
#row(locators = {})
91
92
93
|
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 91
def row(locators={})
rows(locators).first
end
|
#row_count
111
112
113
|
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 111
def row_count
UiaDll::table_row_count search_information
end
|
#rows(locators = {})
95
96
97
98
99
|
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 95
def rows(locators={})
Rows.new(self, locators).select do |row|
Row.locators_match? locators, row
end
end
|
#strings
101
102
103
104
105
106
107
108
109
|
# File 'lib/rautomation/adapter/ms_uia/table.rb', line 101
def strings
= UiaDll.(search_information)
values = UiaDll.table_values(search_information)
return values if .empty?
all_strings = [] <<
values.each_slice(.count) {|r| all_strings << r }
all_strings
end
|