widgetastic_patternfly4.chipgroup module¶
-
class
widgetastic_patternfly4.chipgroup.
CategoryChipGroup
(parent, label, logger=None)¶ Bases:
widgetastic_patternfly4.chipgroup.ChipGroup
Represents a Chip Group with a category label
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
classmethod
all
(browser)¶ Returns a list of all category labels.
-
can_close
¶
-
chips
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
close
()¶
This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
label
¶
-
-
class
widgetastic_patternfly4.chipgroup.
Chip
(*args, **kwargs)¶ Bases:
widgetastic.widget.base.ParametrizedView
,widgetastic_patternfly4.chipgroup._BaseChip
-
PARAMETERS
= ('text',)¶
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
classmethod
all
(browser)¶ Returns a list of the text of each chip
-
read_only
¶ Returns a boolean detailing if the chip is read only
-
remove
()¶ Removes a chip
-
-
class
widgetastic_patternfly4.chipgroup.
ChipGroup
(parent, locator=None, logger=None)¶ Bases:
widgetastic.widget.base.View
Represents a chip group that is “on its own”, i.e. not a part of a chip group category
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
chips
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
get_chips
(show_more=True)¶ A helper to expand the chip group before reading its chips
-
has_chips
¶
-
is_multiselect
¶
-
label
¶
-
overflow
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
read
()¶ Reads the contents of the view and presents them as a dictionary.
Returns: widget_read_value`` where the values are retrieved using the Widget.read()
.Return type: A dict
of ``widget_name
-
remove_all_chips
()¶ Removes all chips from the group
-
remove_chip_by_name
(name)¶ Removes a chip from the group by name
-
show_less
()¶ Collapses a chip group
-
show_more
()¶ Expands a chip group
-
-
class
widgetastic_patternfly4.chipgroup.
ChipGroupToolbar
(parent, locator=None, logger=None)¶ Bases:
widgetastic.widget.base.View
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
TOOLBAR_LOCATOR
= ".//ul[contains(@class, 'pf-c-chip-group') and contains(@class, 'pf-m-toolbar')]/parent::*"¶
-
get_groups
(show_more=True)¶ A helper to expand the chip group toolbar before reading its groups
-
groups
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
has_chips
¶
-
overflow
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
read
()¶ Returns a dict of chips
-
show_less
()¶ Collapses a chip group
-
show_more
()¶ Expands a chip group
-
-
class
widgetastic_patternfly4.chipgroup.
ChipGroupToolbarCategory
(*args, **kwargs)¶ Bases:
widgetastic.widget.base.ParametrizedView
,widgetastic_patternfly4.chipgroup.ChipGroup
Represents a chip group that is part of a toolbar, identifiable by a category label
-
PARAMETERS
= ('label',)¶
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
classmethod
all
(browser)¶ Method that returns tuples of parameters that correspond to PARAMETERS attribute.
It is required for proper functionality of
read()
so it knows the exact instances of the view.Returns: An iterable that contains tuples. Values in the tuples must map exactly to the keys in the PARAMETERS class attribute.
-
chips
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
label
¶
-
-
exception
widgetastic_patternfly4.chipgroup.
ChipReadOnlyError
(chip, message)¶ Bases:
Exception
-
class
widgetastic_patternfly4.chipgroup.
OldChip
(*args, **kwargs)¶ Bases:
widgetastic_patternfly4.chipgroup.Chip
-
ROOT
¶ ParametrizedString
modified to return instances ofsmartloc.Locator
-
classmethod
all
(browser)¶ Returns a list of the text of each chip
-
-
class
widgetastic_patternfly4.chipgroup.
OldOverflowChip
(parent, logger=None, **kwargs)¶ Bases:
widgetastic_patternfly4.chipgroup.OverflowChip
-
ROOT
= ".//*[(self::li or self::div) and contains(@class, 'pf-c-chip') and contains(@class, 'pf-m-overflow')]"¶
-
is_displayed
¶ Returns a boolean detailing if the overflow chip is displayed
-
-
class
widgetastic_patternfly4.chipgroup.
OverflowChip
(parent, logger=None, **kwargs)¶ Bases:
widgetastic_patternfly4.chipgroup._BaseChip
The ‘Show More’/’Show Less’ button is essentially a special kind of chip
-
ROOT
= ".//button[contains(@class, 'pf-c-chip') and contains(@class, 'pf-m-overflow')]"¶
-
show_less
()¶ Collapses a chip group
-
show_more
()¶ Expands a chip group
-
-
class
widgetastic_patternfly4.chipgroup.
StandAloneChipGroup
(parent, locator=None, logger=None)¶ Bases:
widgetastic_patternfly4.chipgroup.ChipGroup
-
chips
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-
overflow
¶ This class handles instantiating and caching of the widgets on view.
It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.
It also acts as a counter, so you can then order the widgets by their “creation” stamp.
-