cfme.web_ui.tabstrip module

The tab strip manipulation which appears in Configure / Configuration and possibly other pages.


import cfme.web_ui.tabstrip as tabs
print is_tab_selected("Authentication")
print get_selected_tab()
class cfme.web_ui.tabstrip.TabStripForm(fields=None, tab_fields=None, identifying_loc=None, order=None, fields_end=None)[source]

Bases: cfme.web_ui.Form

A class for interacting with tabstrip-contained Form elements on pages.

This behaves exactly like a Form, but is able to deal with form elements being broken up into tabs, accessible via a tab strip.

  • fields – A list of field name/locator tuples (same as Form implementation)
  • tab_fields – A dict with tab names as keys, and each key’s value being a list of field name/locator tuples. The ordering of fields within a tab is guaranteed (as it is with the normal Form) but the ordering of tabs is not guaranteed by default. If such ordering is needed, tab_fields can be a collections.OrderedDict.
  • identifying_loc – A locator which should be present if the form is visible.
  • order – If specified, specifies order of the tabs. Can be lower number than number of tabs, remaining values will be complemented.
  • fields_end – Same as fields, but these are appended at the end of generated fields instead.


provisioning_form = web_ui.TabStripForm(
        'Request': [
            ('email', Input("requester__owner_email")),
            ('first_name', Input("requester__owner_first_name")),
            ('last_name', Input("requester__owner_last_name")),
            ('notes', '//textarea[@id="requester__request_notes"]'),
        'Catalog': [
            ('instance_name', Input("service__vm_name")),
            ('instance_description', '//textarea[@id="service__vm_description"]'),

Each tab’s fields will be exposed by their name on the resulting instance just like fields on a Form. Don’t use duplicate field names in the tab_fields dict.

Forms can then be filled in like so:

request_info = {
    'email': '',
    'first_name': 'First',
    'last_name': 'Last',
    'notes': 'Notes about this request',
    'instance_name': 'An instance name',
    'instance_description': 'This is my instance!',
web_ui.fill(provisioning_form, request_info)

Return list of all tabs present.

Returns: list of str Displayed names.


Returns the relevant tab element that can be clicked on.

Parameters:ident_string – The text diplayed on the tab.

Return currently selected tab.

Returns: str Displayed name


Determine whether the passed element is selected.

This function takes the element, climbs to its parent and looks whether the aria-selected attribute contains true. If yes, element is selected.

Parameters:element – WebElement with the link (a)

Returns: bool


Determine whether the element identified by passed name is selected.

Parameters:ident_string – Identification string (displayed name) of the tab button.

Returns: bool


Clicks on the tab with text from ident_string.

Clicks only if it’s not actually selected.

Parameters:ident_string – The text displayed on the tab.