Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cypress check element has an attribute

let $el = Cypress.$("myselector");
if ($el.attr("myattr") === "myvalue") {
    do.A();
} else {
    do.B();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cypress #check #element #attribute
ADD COMMENT
Topic
Name
8+6 =