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
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.jpgbutton.submit|disabled|true— the button is disabledinput[name=email]|placeholder|Enter email