Class: OperaWatir::QuickAddressField

Inherits:
QuickEditField show all
Defined in:
lib/operawatir/quickwidgets/quick_addressfield.rb

Constant Summary

Constants inherited from QuickWidget

OperaWatir::QuickWidget::ConditionTimeout

Instance Method Summary collapse

Methods inherited from QuickEditField

#clear, #focus_with_click, #key_press, #type_text

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

#highlighted_textString

Gets the highlighted text in the address field

Returns:

  • (String)

    higlighted text in address field, if any, else empty

Raises:



51
52
53
# File 'lib/operawatir/quickwidgets/quick_addressfield.rb', line 51

def highlighted_text
  element.getAdditionalText()
end

#load_page_with_url(url) ⇒ String

Enters the url into the address field, and waits for page loading to finish

Examples:

(with RSpec)

addressfield.load_page_with_url("opera:debug").should == "opera:debug"

Parameters:

Returns:

  • (String)

    text in the address field after the page is loaded or a blank string

Raises:



23
24
25
26
27
28
29
# File 'lib/operawatir/quickwidgets/quick_addressfield.rb', line 23

def load_page_with_url(url)
  # Must focus field before calling enter_text...
  focus_with_click

  # Enters text in a field and then hits enter
  enter_text_and_hit_enter(url)
end

#visible_textString

Gets the visible text in the address field

Returns:

  • (String)

    visible text in address field

Raises:



39
40
41
# File 'lib/operawatir/quickwidgets/quick_addressfield.rb', line 39

def visible_text
  element.getVisibleText()
end