Class: OperaWatir::QuickTreeItem
- Inherits:
-
QuickWidget
- Object
- QuickWidget
- OperaWatir::QuickTreeItem
- Defined in:
- lib/operawatir/quickwidgets/quick_treeitem.rb
Constant Summary
Constants inherited from QuickWidget
OperaWatir::QuickWidget::ConditionTimeout
Instance Method Summary collapse
-
#activate_tab_with_click ⇒ Object
Switches to the tree view tab by clicking on it (e.g. on the Advanced page of the preferences dialog).
-
#expand_with_click ⇒ Object
(also: #collapse_with_click)
Expands a tree item when it is clicked.
-
#expand_with_double_click ⇒ Object
(also: #collapse_with_double_click)
Expands a tree item when it is double clicked.
-
#focus_with_click ⇒ Object
Set focus to the tree item by clicking on it.
-
#key_press(key, *opts) ⇒ String
Presses a key including modifiers.
-
#load_window_with_double_click(win_name) ⇒ int
Double clicks the tree item, and waits for the window with window name win_name to be loaded with the url of the treeitem.
-
#open_window_with_click(win_name) ⇒ int
(also: #open_dialog_with_click)
Clicks the tree item, and waits for the window with window name win_name to be shown.
-
#open_window_with_double_click(win_name) ⇒ int
(also: #open_dialog_with_double_click)
Double clicks the tree item, and waits for the window with window name win_name to be shown.
-
#selected? ⇒ Boolean
Checks if the treeitem is selected.
Methods inherited from QuickWidget
#click_with_condition, #double_click_with_condition, #enabled?, #exist?, #focus_with_hover, #has_ui_string?, #height, #middle_click_with_condition, #name, #open_menu_with_rightclick, #open_window_with_hover, #parent_name, #position, #quick_tabs, #quick_widgets, #right_click_with_condition, #text, #to_s, #type, #value, #verify_includes_text, #verify_text, #visible?, #widget_info_string, #width
Methods included from DesktopContainer
#quick_addressfield, #quick_button, #quick_checkbox, #quick_dialogtab, #quick_dropdown, #quick_dropdownitem, #quick_editfield, #quick_find, #quick_griditem, #quick_gridlayout, #quick_label, #quick_menu, #quick_menuitem, #quick_radiobutton, #quick_searchfield, #quick_tab, #quick_thumbnail, #quick_toolbar, #quick_treeitem, #quick_treeview, #quick_window
Instance Method Details
#activate_tab_with_click ⇒ Object
Switches to the tree view tab by clicking on it (e.g. on the Advanced page of the preferences dialog)
93 94 95 96 97 98 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 93 def activate_tab_with_click click # No event yet so just cheat and sleep sleep(0.1); end |
#expand_with_click ⇒ Object Also known as: collapse_with_click
Expands a tree item when it is clicked
30 31 32 33 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 30 def # For now there is no difference to focusing focus_with_click end |
#expand_with_double_click ⇒ Object Also known as: collapse_with_double_click
Expands a tree item when it is double clicked
43 44 45 46 47 48 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 43 def scroll_item_into_view unless visible? double_click # No event yet so just cheat and sleep sleep(0.1); end |
#focus_with_click ⇒ Object
Set focus to the tree item by clicking on it
18 19 20 21 22 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 18 def focus_with_click # First scroll the item into view scroll_item_into_view unless visible? super end |
#key_press(key, *opts) ⇒ String
The edit field must have focus for this method to work
WARNING: This method will not wait for page load or window shown events. If you need to wait for these events do not use this method
Presses a key including modifiers
69 70 71 72 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 69 def key_press(key, *opts) key_press_direct(key, *opts) sleep(0.1) end |
#load_window_with_double_click(win_name) ⇒ int
Double clicks the tree item, and waits for the window with window name win_name to be loaded with the url of the treeitem
146 147 148 149 150 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 146 def load_window_with_double_click(win_name) wait_start click(:left, 2) wait_for_window_loaded(win_name) end |
#open_window_with_click(win_name) ⇒ int Also known as: open_dialog_with_click
Clicks the tree item, and waits for the window with window name win_name to be shown
129 130 131 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 129 def open_window_with_click(win_name) open_window_with_click_internal(win_name, 1) end |
#open_window_with_double_click(win_name) ⇒ int Also known as: open_dialog_with_double_click
Double clicks the tree item, and waits for the window with window name win_name to be shown
111 112 113 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 111 def open_window_with_double_click(win_name) open_window_with_click_internal(win_name, 2) end |
#selected? ⇒ Boolean
Checks if the treeitem is selected
81 82 83 |
# File 'lib/operawatir/quickwidgets/quick_treeitem.rb', line 81 def selected? element.isSelected end |