How to select only first n elements? #22362
Unanswered
art-qa
asked this question in
Questions and Help
Replies: 1 comment 1 reply
-
You can get an array of all the messages that are filtered by Here is a working example. cy.get(".inbox-message") // returns array of all matching elements
.filter(":lt(3)") // filter all matching elements
.should('have.length', 3) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a table with a list of messages that are filtered. There is a method each to go through every each of them. But I want to go through only first 3 (divs) of them. How can it be done? The classes are all the same.
Beta Was this translation helpful? Give feedback.
All reactions