I have an HTML element with a disabled
attribute that is either true
or `false, like:
<div class="row" disabled="false">
or
<div class="row" disabled="true">
I thought this would be straightforward to verify in Cypress by doing something like:
cy.get("div.row").should("have.attr", "disabled", "false")
However, when I tried that the test fails because Cypress reports that the disabled
attribute of the element does not have the value "false" but instead has the value "disabled".
If I open the browser inspection tool I can verify that the attribute is shown as I've written above. Any idea what is going wrong?