I need to take 2 lists of text values on page to use each of them in different cheking. I do it by xpath
cy.xpath('//tbody/tr[position()<10]/td[6]/span').then(items => { cy.wrap(items).as('multipleList') }) cy.xpath('//tbody/tr[position()<21][position()>15]/td[6]/span').then(items => { cy.wrap(items).as('commaList') }) cy.get('@multipleList').each((qwer, index) => {..........}) cy.get('@commaList').each((qwer, index) => {..........})
But after using the first list (@multipleList), it shows error that the second list (@commaList) is empty.
If I swap them, then @commaList is being executed OK, but @multipleList shows the same error.