Module: OperaWatir::ClickableItem

Included in:
QuickButton
Defined in:
lib/operawatir/clickable_item.rb

Instance Method Summary collapse

Instance Method Details

#close_menu_with_click(menu_name) ⇒ Object

Clicks item and waits for the menu to close

Returns:

  • name of menu closed



42
43
44
45
46
# File 'lib/operawatir/clickable_item.rb', line 42

def close_menu_with_click(menu_name)
  wait_start
  click
  wait_for_menu_closed(menu_name)
end

#load_page_with_clickint

Clicks the button, and waits for loading to finish

Returns:

  • (int)

    Window ID of the window shown or 0 if no window is shown

Raises:



12
13
14
15
16
17
# File 'lib/operawatir/clickable_item.rb', line 12

def load_page_with_click
  wait_start
  click
  # Just wait for the load
  wait_for_window_loaded("")
end

#open_menu_with_click(menu_name) ⇒ Object

Clicks the item, and waits for the menu with menu with name menu_name to be shown

Parameters:

  • name (String)

    of menu that should open

Returns:

  • name of menu opened if it matches the parameter menu_name, otherwise returns empty string

Raises:



60
61
62
63
64
# File 'lib/operawatir/clickable_item.rb', line 60

def open_menu_with_click(menu_name)
  wait_start
  click
  wait_for_menu_shown(menu_name)
end

#open_window_with_click(win_name) ⇒ int Also known as: open_dialog_with_click

Clicks the button, and waits for the window with window name win_name to be shown

Parameters:

  • win_name (String)

    name of the window that will be opened (Pass a blank string for any window)

Returns:

  • (int)

    Window ID of the window shown or 0 if no window is shown

Raises:



30
31
32
33
34
# File 'lib/operawatir/clickable_item.rb', line 30

def open_window_with_click(win_name)
  wait_start
  click
  wait_for_window_shown(win_name)
end