Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Cypress – closest command

Category: Cypress
  • 14 Events
  • 54 Hello
--------------------------------- cy.get('.versal-badge') .closest('ul') .should('have.class', 'list') closest command used from this simple example we can conclude that it fetches the element of versal-badge of which its ancestor is ul tag and that ul tag contains a class called a list.

Leave a Reply

Your email address will not be published. Required fields are marked *