widgetastic_patternfly4.alert module

class widgetastic_patternfly4.alert.Alert(parent, locator, logger=None)

Bases: widgetastic_patternfly4.alert.BaseAlert, widgetastic.widget.base.Widget

ROOT

ParametrizedString modified to return instances of smartloc.Locator

class widgetastic_patternfly4.alert.BaseAlert

Bases: object

Represents alert block.

https://www.patternfly.org/v4/documentation/react/components/alert

ACTION = './/div[contains(@class, "pf-c-alert__action")]'
DESCRIPTION = './/div[@class="pf-c-alert__description"]'
TITLE = './/h4[@class="pf-c-alert__title"]'
TYPE_MAPPING = {'pf-m-danger': 'error', 'pf-m-info': 'info', 'pf-m-success': 'success', 'pf-m-warning': 'warning'}
assert_no_error()

Asserts that the warning is not of the error type.

body

Returns the text of the body of the alert as a string.

click_action()

Clicks the defined action button of the alert.

read()

Returns the text of the body of the alert as a string.

title

Returns the title text of the alert as a string.

type

Returns the type of the alert, one of warning, success, error or info.