Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cypress element length

cy.get('.listings-grid')
  .find('.listing')
  .then(listing => {
    const listingCount = Cypress.$(listing).length;
    expect(listing).to.have.length(listingCount);
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cypress #element #length
ADD COMMENT
Topic
Name
7+8 =