Back to all steps

Check element attribute

Step fields
1 selector (text)
2 attribute name (text)
3 expected value (text)
In a scenario, fields are joined with |.
Assert an element attribute equals a value. Format: selector|attr_name|expected_value.
Examples: a.download|href|/files/report.pdf · #user-avatar|src|avatar.jpg
Usage example

Check the value of an element’s HTML attribute.

Format: selector|attribute_name|expected_value

Examples:

  • a.download|href|/files/report.pdf
  • #user-avatar|src|/img/avatar.jpg
  • button.submit|disabled|true — the button is disabled
  • input[name=email]|placeholder|Enter email