Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
cy.contains('item left')
// do the following code on the element that contains "item left".
.then(countItemsLeft => {
// if the text in the element is "1 items left", log it.
if (countItemsLeft.innerText === '1 items left') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment