Cypress - Selecting Elements
How can you verify that the first and last elements in a list have specific texts "Start" and "End" respectively using Cypress commands?
first() and last() select the first and last elements respectively.should('have.text', 'Start') and should('have.text', 'End') verifies the text content of those elements.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions