Class: RFormSpec::ListView
- Inherits:
-
BaseControl
- Object
- BaseControl
- RFormSpec::ListView
- Defined in:
- lib/rformspec/control.rb
Instance Attribute Summary
Attributes inherited from BaseControl
Instance Method Summary collapse
- #de_highlight(row_start, row_end = nil) ⇒ Object (also: #de_select)
-
#get_item_text(row, col = 0) ⇒ Object
row and column index starts from 0,.
-
#highlight(row_start, row_end = nil) ⇒ Object
can’t use select, as it is Ruby keyword.
- #is_selected?(row) ⇒ Boolean
- #item_count ⇒ Object
- #select_all ⇒ Object
- #subitem_count ⇒ Object
Methods inherited from BaseControl
#click, #focus, #get_text, #initialize, #is_enabled?, #is_visible?, #send_text, #set_text
Methods included from Driver
#close_window, #driver, #focus_window, #key_press, #mouse_click, #mouse_move, #open_file_dialog, #try_for, #wait_and_focus_window, #wait_for_window, #window_exists?
Methods included from TestWisePlugin
#connect_to_testwise, #debug, #dump_caller_stack, #notify_screenshot_location, #operation_delay
Constructor Details
This class inherits a constructor from RFormSpec::BaseControl
Instance Method Details
#de_highlight(row_start, row_end = nil) ⇒ Object Also known as: de_select
138 139 140 141 |
# File 'lib/rformspec/control.rb', line 138 def de_highlight(row_start, row_end = nil) row_end ||= row_start driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "DeSelect" , "#{row_start}", "#{row_end}") end |
#get_item_text(row, col = 0) ⇒ Object
row and column index starts from 0,
128 129 130 |
# File 'lib/rformspec/control.rb', line 128 def get_item_text(row, col = 0) driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetText" , "#{row}", col) end |
#highlight(row_start, row_end = nil) ⇒ Object
can’t use select, as it is Ruby keyword
133 134 135 136 |
# File 'lib/rformspec/control.rb', line 133 def highlight(row_start, row_end = nil) row_end ||= row_start driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "Select" , "#{row_start}", "#{row_end}") end |
#is_selected?(row) ⇒ Boolean
153 154 155 |
# File 'lib/rformspec/control.rb', line 153 def is_selected?(row) 1 == driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "IsSelected" , "#{row}", "") end |
#item_count ⇒ Object
122 123 124 125 |
# File 'lib/rformspec/control.rb', line 122 def item_count result = driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetItemCount" , "", "").to_i result ? result.to_i : 0 end |
#select_all ⇒ Object
149 150 151 |
# File 'lib/rformspec/control.rb', line 149 def select_all driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "SelectAll" , "", "") end |
#subitem_count ⇒ Object
144 145 146 147 |
# File 'lib/rformspec/control.rb', line 144 def subitem_count result = driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetSubItemCount" , "", "").to_i result ? result.to_i : 0 end |