Uploaded January 2024 | Updated September 2026, 1 week ago
This video shows how to use CSS OR selector comma operator to grab multiple elements from the page. Remember: the order of the elements will be the order of the elements in the document NOT in the order specified in the selector. I also show how to expand the number of selected elements inside the jQuery subject by invoking the jQuery method "add" api.jquery.com/add Find this recipe at glebbahmutov.com/cypress-examples
This video shows how to use CSS OR selector comma operator to grab multiple elements from the page. Remember: the order of the elements will be the order of the elements in the document NOT in the order specified in the selector. I also show how to expand the number of selected elements inside the jQuery subject by invoking the jQuery method "add" api.jquery.com/add Find this recipe at glebbahmutov.com/cypress-examples



![Chai Nested Property Assertion In Cypress
This video shows a lesser known Chai assertion have.nested.property The assertion works very well with objects and arrays:
cy.wrap({ name: { first: Joe } })
.should(have.nested.property, name.first, Joe)
// array example
cy.wrap([
{ sum: 42 },
{ sum: 101 },
{ sum: { errors: [Invalid operation] } },
]).should(
have.nested.property,
2.sum.errors.0,
Invalid operation,
)
The code examples are at https://glebbahmutov.com/cypress-examples/recipes/lesser-known-chai-assertions.html Chai Nested Property Assertion In Cypress](https://i.ytimg.com/vi/R1u73hgA1_Q/mqdefault.jpg)






