Class: OperaWatir::QuickButton
- Inherits:
-
QuickWidget
- Object
- QuickWidget
- OperaWatir::QuickButton
- Includes:
- ClickableItem
- Defined in:
- lib/operawatir/quickwidgets/quick_button.rb
Direct Known Subclasses
Constant Summary
Constants inherited from QuickWidget
OperaWatir::QuickWidget::ConditionTimeout
Instance Method Summary collapse
-
#change_page_with_click ⇒ int
Clicks the button, and waits for the dialog wizard to switch to the next page.
-
#close_toolbar_with_click ⇒ Object
(also: #close_panel_with_click)
Clicks button to close the toolbar.
-
#close_window_with_click(win_name) ⇒ int
(also: #close_dialog_with_click)
Clicks the button, and waits for the window with window name win_name to closed.
-
#default? ⇒ Boolean
Checks if the button is the default button.
-
#expand_with_click ⇒ Object
(also: #collapse_with_click)
Clicks button to expand or collapse the toolbar.
-
#toggle_with_click ⇒ int
Clicks a button or expand control and toggles it state.
-
#value ⇒ int
Gets the value of the button or expand control.
-
#wait_for_enabled ⇒ Boolean
Pauses to wait for security dialogs when buttons are not active right away on opening.
-
#wait_for_visible ⇒ Boolean
Waits for widget to be visible.
Methods included from ClickableItem
#close_menu_with_click, #load_page_with_click, #open_menu_with_click, #open_window_with_click
Methods inherited from QuickWidget
#click_with_condition, #double_click_with_condition, #enabled?, #exist?, #focus_with_click, #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, #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
#change_page_with_click ⇒ int
Clicks the button, and waits for the dialog wizard to switch to the next page
32 33 34 35 36 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 32 def change_page_with_click() wait_start click wait_for_window_shown("") end |
#close_toolbar_with_click ⇒ Object Also known as: close_panel_with_click
Clicks button to close the toolbar
92 93 94 95 96 97 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 92 def click # Cheat since we don't have an event yet sleep(0.1) end |
#close_window_with_click(win_name) ⇒ int Also known as: close_dialog_with_click
Clicks the button, and waits for the window with window name win_name to closed
50 51 52 53 54 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 50 def close_window_with_click(win_name) wait_start click wait_for_window_close(win_name) end |
#default? ⇒ Boolean
Checks if the button is the default button
16 17 18 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 16 def default? element.isDefault end |
#expand_with_click ⇒ Object Also known as: collapse_with_click
Clicks button to expand or collapse the toolbar
107 108 109 110 111 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 107 def click sleep(0.1) #No refresh element because it might not be there still (after click):) end |
#toggle_with_click ⇒ int
Clicks a button or expand control and toggles it state
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 69 def toggle_with_click click # Cheat since we don't have an event yet sleep(0.1) # Note: click might have made this element dissapear ... begin element(true).getValue rescue Exceptions::UnknownObjectException nil end end |
#value ⇒ int
Gets the value of the button or expand control.
122 123 124 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 122 def value element.getValue end |
#wait_for_enabled ⇒ Boolean
Pauses to wait for security dialogs when buttons are not active right away on opening
135 136 137 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 135 def wait_for_enabled end |
#wait_for_visible ⇒ Boolean
Waits for widget to be visible
144 145 146 |
# File 'lib/operawatir/quickwidgets/quick_button.rb', line 144 def wait_for_visible end |