Skip to main content
Asserts a condition on a computed CSS style on the element. Each alias is its own single-key command. There is no separate condition or negated field. The positive and negative variants map directly to the table below.

Parameters

ParameterTypeRequiredDescription
elementstringNoNatural-language description of the target. Use exactly one of element, css, coords, or x/y.
cssstringNoCSS selector for the target. Use instead of the description key.
coordsstring | { x, y }NoAbsolute viewport coordinates. Either an x, y string (e.g. 120, 40) or a { x, y } object.
xnumber | stringNoX coordinate. Must be provided together with y.
ynumber | stringNoY coordinate. Must be provided together with x.
forcebooleanNoForce the action even when the element is not actionable.
iframestringNoURL or URL pattern of the iframe that contains the target element.
timeoutnumberNoMaximum time in milliseconds to wait for the condition to hold.
namestringYesAttribute name (for attribute checks) or CSS property name (for style checks).
valuestringYesValue to compare against. Required for every condition except *Exists and *DoesNotExist.
saveAsstringNoName of the variable to write this step’s return value to.
retriesnumberNoNumber of times to retry the step on failure before failing the test.
skippedbooleanNoSkip this step at execution time.

Examples

- checkElementStyleEquals:
    element: username input
    name: font-size # the computed CSS property to read
    value: 16px # the value it must equal
- checkElementStyleDoesNotEqual:
    element: username input
    name: font-size
    value: 14px
- checkElementStyleEquals:
    element: span enclosing asdfasdfsf
    name: text-decoration-line
    value: line-through

Notes

Aliases supported by this family:
Alias
checkElementStyleExists
checkElementStyleDoesNotExist
checkElementStyleContains
checkElementStyleDoesNotContain
checkElementStyleEquals
checkElementStyleDoesNotEqual
checkElementStyleStartsWith
checkElementStyleDoesNotStartWith