Class: YuiRestClient::Widgets::Menucollection
- Defined in:
- lib/yui_rest_client/widgets/menucollection.rb
Overview
Class representing a menucollection in UI. It can be YMenuButton, YMenuBar.
Instance Method Summary collapse
-
#click(path) ⇒ Object
Sends action to click one item of a menu (menu button or menu bar) in UI.
-
#items ⇒ Array<String>
Returns the list of items available to select from widget.
Methods inherited from Base
#action, #collect_all, #debug_label, #enabled?, #exists?, #initialize, #property
Methods included from YuiRestClient::Waitable
Constructor Details
This class inherits a constructor from YuiRestClient::Widgets::Base
Instance Method Details
#click(path) ⇒ Object
Sends action to click one item of a menu (menu button or menu bar) in UI. with id ‘test_id’.
13 14 15 |
# File 'lib/yui_rest_client/widgets/menucollection.rb', line 13 def click(path) action(action: Actions::SELECT, value: path) end |
#items ⇒ Array<String>
Returns the list of items available to select from widget.
44 45 46 |
# File 'lib/yui_rest_client/widgets/menucollection.rb', line 44 def items property(:items).map { |x| x[:label] } end |