cfme.web_ui.toolbar module

A set of functions for dealing with the toolbar buttons

The main CFME toolbar is accessed by using the Root and Sub titles of the buttons.

Usage:

tb = web_ui.toolbar
tb.select('Configuration', 'Add a New Host')
cfme.web_ui.toolbar.is_active(root)[source]

Checks if a button is currently depressed

Parameters:root – The root button’s name as a string.

Returns: True if the button is depressed, False if not.

cfme.web_ui.toolbar.is_greyed(root, sub=None)[source]

Checks if a button is greyed out.

Parameters:root – The root button’s name as a string.

Returns: True if the button is greyed, False if not.

cfme.web_ui.toolbar.is_vms_compressed_view()[source]

Returns whether compressed view is selected or not.

cfme.web_ui.toolbar.is_vms_details_view()[source]

Returns whether details view is selected or not.

cfme.web_ui.toolbar.is_vms_exists_view()[source]

Returns whether exists mode is selected or not.

cfme.web_ui.toolbar.is_vms_expanded_view()[source]

Returns whether expanded view is selected or not.

cfme.web_ui.toolbar.is_vms_graph_view()[source]

Returns whether graph view is selected or not.

cfme.web_ui.toolbar.is_vms_grid_view()[source]

Returns whether grid view is selected or not.

cfme.web_ui.toolbar.is_vms_hybrid_view()[source]

Returns whether hybrid view is selected or not.

cfme.web_ui.toolbar.is_vms_list_view()[source]

Returns whether list view is selected or not.

cfme.web_ui.toolbar.is_vms_tabular_view()[source]

Returns whether tabular view is selected or not.

cfme.web_ui.toolbar.is_vms_tile_view()[source]

Returns whether tile view is selected or not.

cfme.web_ui.toolbar.refresh()[source]

Refreshes page, attempts to use cfme refresh button otherwise falls back to browser refresh.

cfme.web_ui.toolbar.root_loc(root)[source]

Returns the locator of the root button

Parameters:root – The string name of the button.

Returns: A locator for the root button.

cfme.web_ui.toolbar.select(root, sub=None, invokes_alert=False)[source]

Clicks on a button by calling the click_n_move() method.

Parameters:
  • root – The root button’s name as a string.
  • sub – The sub button’s name as a string. (optional)
  • invokes_alert – If True, then the behaviour is little bit different. After the last click, no ajax wait and no move away is done to be able to operate the alert that appears after click afterwards. Defaults to False.

Returns: True if everything went smoothly Raises: cfme.exceptions.ToolbarOptionGreyed

cfme.web_ui.toolbar.select_n_move(el)[source]

Clicks an element and then moves the mouse away

This is required because if the button is active and we clicked it, the CSS class doesn’t change until the mouse is moved away.

Parameters:el – The element to click on.

Returns: None

cfme.web_ui.toolbar.set_vms_compressed_view()[source]

Set the view to compressed.

cfme.web_ui.toolbar.set_vms_details_view()[source]

Set the view to details.

cfme.web_ui.toolbar.set_vms_exists_view()[source]

Set the view to exists.

cfme.web_ui.toolbar.set_vms_expanded_view()[source]

Set the view to expanded.

cfme.web_ui.toolbar.set_vms_graph_view()[source]

Set the view to graph.

cfme.web_ui.toolbar.set_vms_grid_view()[source]

Set the view to grid.

cfme.web_ui.toolbar.set_vms_hybrid_view()[source]

Set the view to hybrid.

cfme.web_ui.toolbar.set_vms_list_view()[source]

Set the view to list.

cfme.web_ui.toolbar.set_vms_tabular_view()[source]

Set the view to tabular.

cfme.web_ui.toolbar.set_vms_tile_view()[source]

Set the view to tile.

cfme.web_ui.toolbar.sub_loc(sub)[source]

Returns the locator of the sub button

Parameters:sub – The string name of the button.

Returns: A locator for the sub button.