widgetastic_patternfly4.button module

class widgetastic_patternfly4.button.BaseButton

Bases: object

BLOCK = 'pf-m-block'
CHECK_VISIBILITY = True
DANGER = 'pf-m-danger'
PLAIN = 'pf-m-plain'
PRIMARY = 'pf-m-primary'
SECONDARY = 'pf-m-secondary'
TETRIARY = 'pf-m-tertiary'
active

Returns a boolean detailing if the button is active.

disabled

Returns a boolean detailing if the button is disabled.

read()

Returns the string of the button.

title

Returns the title of the button as a string.

class widgetastic_patternfly4.button.Button(parent, *text, **kwargs)

Bases: widgetastic_patternfly4.button.BaseButton, widgetastic.widget.base.Widget, widgetastic.widget.base.ClickableMixin

A Patternfly button

You can match by text, partial text or by attributes, you can also add the patternfly classes into the matching.

Button("Text of button (unless it is an input ...)")
Button("contains", "Text of button (unless it is an input ...)")
Button(title="Show xyz")  # And such
Button("Add", classes=[Button.PRIMARY])
Button(locator=".//xpath")
assert button.active
assert not button.disabled
ROOT

ParametrizedString modified to return instances of smartloc.Locator