widgetastic_patternfly4.select module¶
-
class
widgetastic_patternfly4.select.BaseCheckboxSelect¶ Bases:
widgetastic_patternfly4.select.BaseSelectRepresents the Patternfly Checkbox Select.
https://www.patternfly.org/v4/documentation/react/components/select
-
ITEMS_LOCATOR= ".//label[contains(@class, 'pf-c-select__menu-item')]"¶
-
ITEM_LOCATOR= ".//label[contains(@class, 'pf-c-select__menu-item')]/span[starts-with(normalize-space(.), {})]/preceding-sibling::input"¶
-
fill(items)¶ Fills a Checkbox with all items. Example dictionary: {“foo”: True, “bar”: False, “baz”: True}
Parameters: items – A dictionary containing what items to select (True) or deselect (False)
-
item_deselect(items, close=True)¶ Opens the Checkbox and deselects the desired item.
Parameters: - item – Item to be selected
- close – Close the dropdown when finished
-
item_select(items, close=True)¶ Opens the Checkbox and selects the desired item.
Parameters: - item – Item to be selected
- close – Close the dropdown when finished
-
items¶ Returns a list of all CheckboxSelect items as strings.
-
read()¶ Returns a dictionary containing the selected status as bools.
-
-
class
widgetastic_patternfly4.select.BaseSelect¶ Bases:
objectRepresents the Patternfly Select.
https://www.patternfly.org/v4/documentation/react/components/select
-
BUTTON_LOCATOR= './button'¶
-
ITEMS_LOCATOR= ".//ul[@class='pf-c-select__menu']/li[contains(@class, 'pf-c-select__menu-wrapper')]"¶
-
ITEM_LOCATOR= ".//*[contains(@class, 'pf-c-select__menu-item') and normalize-space(.)={}]"¶
-
SELECTED_ITEM_LOCATOR= ".//span[contains(@class, 'ins-c-conditional-filter') and normalize-space(.)={}]"¶
-
TEXT_LOCATOR= ".//div[contains(@class, 'pf-c-select') and child::button[normalize-space(.)={}]]"¶
-
fill(value)¶ Fills a Select with a value.
-
item_element(item, close=True)¶ Returns a WebElement for given item name.
-
item_select(item)¶ Opens the Select and selects the desired item.
Parameters: item – Item to be selected Raises: SelectItemDisabled– if item is disabled
-
read()¶ Returns a string of the text of the selected option.
-
-
class
widgetastic_patternfly4.select.CheckboxSelect(parent, text=None, locator=None, logger=None)¶ Bases:
widgetastic_patternfly4.select.BaseCheckboxSelect,widgetastic_patternfly4.dropdown.Dropdown-
DEFAULT_LOCATOR= './/div[contains(@class, "pf-c-select")][1]'¶
-
-
class
widgetastic_patternfly4.select.Select(parent, text=None, locator=None, logger=None)¶ Bases:
widgetastic_patternfly4.select.BaseSelect,widgetastic_patternfly4.dropdown.Dropdown-
DEFAULT_LOCATOR= './/div[contains(@class, "pf-c-select")][1]'¶
-
-
exception
widgetastic_patternfly4.select.SelectItemDisabled¶ Bases:
widgetastic_patternfly4.dropdown.DropdownItemDisabled
-
exception
widgetastic_patternfly4.select.SelectItemNotFound¶ Bases:
widgetastic_patternfly4.dropdown.DropdownItemNotFound