Overview
TheELEMENT_CHECK step verifies various properties of elements on the page. It supports checking text content, attributes, element states, and existence.
Parameters
Element selector to check
Type of assertion to perform:
ELEMENT_TEXT- Check element text contentELEMENT_ATTRIBUTE- Check attribute valueELEMENT_STATE- Check element stateEXISTS- Check element exists
Expected value for text or attribute assertions
Attribute name to check (required for ELEMENT_ATTRIBUTE)
State to verify (required for ELEMENT_STATE):
visible- Element is visibleenabled- Element is enablededitable- Element is editable
Behavior
- Element Location: Finds the element using the selector
- Property Retrieval: Gets the requested property (text, attribute, or state)
- Comparison: Compares actual value with expected value
- Result: Passes if values match, fails with details if not
Common Use Cases
- Verifying form validation messages
- Checking button states (enabled/disabled)
- Validating dynamic content updates
- Confirming element visibility
- Checking HTML attributes (href, src, etc.)
- Verifying text content matches expectations
Error Handling
The step will fail if:- The element cannot be found
- The actual value doesn’t match the expected value
- The element doesn’t have the specified attribute
- The element is not in the expected state

