You want to check if the value of the form element matches specific conditions. Only works with
form elements like
You want to assert the text in an element, for example, if a registration button contains a "
Sign up" text. This is the most common type of assertion.
You need to do an advanced assertion, ex. comparing the element text with variables, making an API request, or using
localStorage. When your JS function returns
true, the assertion will be marked as
passed. Also see custom JS actions
Number of elements in DOM
You want to check the number of elements that match a given selector, for example, you want to assert that a list shows 10 elements
You want to check if an element is visible, meaning that it's in the viewport, opacity is not 0, and its visibility is not set to hidden. For example, you can assert that some error message is shown and visible to the user.
You want to check if an element is in DOM but not visible, meaning that it's not in the viewport or opacity is 0 or its visibility is set to hidden.
You want to check if an element exists in the DOM (HTML structure), but not necessarily must be visible
</> DOM element does not exists
You want to check if an element is not present in the DOM (HTML structure), ex. you want to make sure that some element disappeared completely from the page and it's not just set to
You want to check if a checkbox or radio button is checked, meaning that it is selected, enabled
Form input is not checked
You want to check if a checkbox or radio button is unselected, unchecked