Target Assertions

target.assertAttribute

Asserts that the specified attribute of a target satisfies the given constraint

target.assertProperty

Asserts that the specified property of a target satisfies the given constraint

target.assertVisible

Asserts that the element is currently visible in the current viewport (intersecting, styles display is not none, visible is not hidden, opacity is not 0)

target.assertHtml

Asserts that the HTML content of the focused element satisfies the given constraint

target.assertBoundingBox

Asserts that the bounding box (size and position) of a target satisfies the given constraint

target.assertPosition

Asserts that target's position relative to other given target

target.assertStyle

Asserts that the computed style of a target matches the given value

target.assertMatchesSelector

Asserts that a target matches a given selector or pseudo-selector

target.assertNodeCount

Asserts that number of child elements matching a specified selector satisfies the given constraint.

target.assertTextCount

Asserts that number of child elements containing a specified text satisfies the given constraint.

target.assertContainsClass

Asserts that the specified class value exists in the element's class attribute.

target.assertScroll

Asserts that scroll offset on the target satisfies the given constraint

Last updated