cy.get('.pass-input-placeholder > .input-wrapper > .error-msg > .msg-body > span')
.should('contain', 'Invalid password');
Why are the classes separated with ">"? Does it apply only for classes?
cy.get('.pass-input-placeholder > .input-wrapper > .error-msg > .msg-body > span')
.should('contain', 'Invalid password');
Why are the classes separated with ">"? Does it apply only for classes?
It means select "the immediate child". It applies for classes, tags, ids, attributes, anything.
So .pass-input-placeholder > .input-wrapper
would find this
<div class="pass-input-placeholder">
<div class="input-wrapper">
but not this
<div class="pass-input-placeholder">
<div>
<div class="input-wrapper">
But without >
the second HTML will be found as well.
cy.get('.pass-input-placeholder .input-wrapper') // finds any descendent