I have a 2 variables and want to checking alphabetically sort for its.
This is my code
cy.get('.list-item').eq(1)
.find('.activity-name span')
.invoke('text')
.then(text => {
const first = text;
cy.get('.activity').click();
cy.get('.list-item').eq(1)
.find('.activity-name span')
.invoke('text')
.then(text => {
const second = text;
// Here I want to check if the result of first element is equal second-variable
});
});
Pls help me. How can I do it with cypress
Aucun commentaire:
Enregistrer un commentaire