class YuiRestClient::Widgets::Menucollection
Class representing a menucollection in UI. It can be YMenuButton, YMenuBar.
Public Instance Methods
click(path)
click to toggle source
Sends action to click one item of a menu (menu button or menu bar) in UI. @param path [String] value to select from menu. @example Click menu item with label 'sub_menu_item' for menucollection with id 'test_id'. @example
app.menucollection(id: 'test_id').click('menu_item|sub_menu_item')
# File lib/yui_rest_client/widgets/menucollection.rb, line 13 def click(path) action(action: Actions::SELECT, value: path) end
items()
click to toggle source
Returns the list of items available to select from widget. @return [Array<String>] array of strings. @example Get items from widget with id “test_id”
{ "class": "YMenuButton", "debug_label": "test", "icon_base_path": "", "id": "test_id", "items": [ { "label": "button1" }, { "label": "button2" }, { "label": "button3" } ], "items_count": 3, "label": "button group" }
@example
app.menucollection(id: 'test').items # button1 # button2 # button3
# File lib/yui_rest_client/widgets/menucollection.rb, line 44 def items property(:items).map { |x| x[:label] } end