Class: OperaWatir::QuickTab
- Inherits:
-
QuickButton
- Object
- QuickWidget
- QuickButton
- OperaWatir::QuickTab
- Defined in:
- lib/operawatir/quickwidgets/quick_tab.rb
Constant Summary
Constants inherited from QuickWidget
OperaWatir::QuickWidget::ConditionTimeout
Instance Method Summary collapse
-
#activate_tab_with_click ⇒ int
Clicks the tab button, and waits for the tab to be shown / switches to the page.
-
#close_window_with_doubleclick ⇒ int
Double clicks the tab and waits for it to be closed.
-
#group_with_drag(tab_target) ⇒ int
Drag and drop this tab on another tab to add it to its tab group.
-
#move_with_drag(tab_target) ⇒ Object
Drag and drop this tab on tab tab_target.
Methods inherited from QuickButton
#change_page_with_click, #close_toolbar_with_click, #close_window_with_click, #default?, #expand_with_click, #toggle_with_click, #value, #wait_for_enabled, #wait_for_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, #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 ⇒ int
Clicks the tab button, and waits for the tab to be shown / switches to the page
58 59 60 61 62 |
# File 'lib/operawatir/quickwidgets/quick_tab.rb', line 58 def activate_tab_with_click wait_start click wait_for_window_activated("Document Window") end |
#close_window_with_doubleclick ⇒ int
Double clicks the tab and waits for it to be closed
69 70 71 72 73 |
# File 'lib/operawatir/quickwidgets/quick_tab.rb', line 69 def close_window_with_doubleclick wait_start click(:left, 2) wait_for_window_close("Document Window") end |
#group_with_drag(tab_target) ⇒ int
Drag and drop this tab on another tab to add it to its tab group
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/operawatir/quickwidgets/quick_tab.rb', line 33 def group_with_drag(tab_target) raise(Exceptions::UnknownObjectException) unless tab_target.type == :tabbutton # Drop on the edge of a tab to make the grouping work drag_and_drop_on(tab_target, :edge) sleep(0.1) #Get the number of tabs in the group element(true).value end |
#move_with_drag(tab_target) ⇒ Object
Drag and drop this tab on tab tab_target
17 18 19 20 21 22 |
# File 'lib/operawatir/quickwidgets/quick_tab.rb', line 17 def move_with_drag(tab_target) raise(Exceptions::UnknownObjectException) unless tab_target.type == :tabbutton drag_and_drop_on(tab_target, :center) sleep(0.1) end |