Docs/Steps

Element Check

element-check asserts the state of a single element. It is the fastest and most deterministic assertion in Assrt, and should be your default when you know what to point at.

yaml
- element-check:
    element: the invoice total
    visible: true
    enabled: true
    text: "$1,240.00"
    attributes:
      data-status: paid
FieldTypeDescription
elementrequiredstringTarget element.
visiblebooleanWhether the element is laid out and not hidden.
enabledbooleanWhether the element is interactable.
textstringExact text the element should contain.
text-containsstringSubstring the text should contain.
attributesRecord<string, string>Attribute key/value pairs to match.