Class: JQueryUIWidgets::Menus
- Inherits:
-
PageObject::Elements::UnorderedList
- Object
- PageObject::Elements::UnorderedList
- JQueryUIWidgets::Menus
- Defined in:
- lib/jqueryui_widgets/menus.rb
Overview
Class that wraps the jQueryUI menu, allowing users to interact with both top level, and nested menus.
NOTE: We’ve kept to the basic functionality of the Menu widget in order to avoid causing difficulty with the usage of the widget since all of the JQuery UI Widgets are so customizable. In this fashion, we allow the user to customize the code to suit their own needs.
Instance Method Summary collapse
-
#search_for(*labels) ⇒ Object
Search_for allows the user to supplement the select method and search for a specific element within a menu or sub-menu.
-
#select(*labels) ⇒ Object
The select method allows you to pass in a theoretically infinite number of variables from the base source through the step definitions and into page to iterate through the top menu and into any submenus you encounter.
Instance Method Details
#search_for(*labels) ⇒ Object
Search_for allows the user to supplement the select method and search for a specific element within a menu or sub-menu.
be found in the order they are given.
48 49 50 51 52 53 54 |
# File 'lib/jqueryui_widgets/menus.rb', line 48 def search_for(*labels) the_list_item = nil (labels) do |list_item| the_list_item = list_item end the_list_item end |
#select(*labels) ⇒ Object
The select method allows you to pass in a theoretically infinite number of variables from the base source through the step definitions and into page to iterate through the top menu and into any submenus you encounter.
in the order in which they were provided.
31 32 33 34 35 |
# File 'lib/jqueryui_widgets/menus.rb', line 31 def select(*labels) (labels) do |list_item| list_item.fire_event('onclick') end end |