thankful-wire-37848
12/15/2022, 10:03 AMadventurous-eve-81295
12/15/2022, 11:09 AMadventurous-eve-81295
12/15/2022, 11:09 AMthankful-wire-37848
12/15/2022, 11:17 AMgray-kilobyte-89541
12/15/2022, 11:47 AMgray-kilobyte-89541
12/15/2022, 11:48 AMcy.().find(...).its('length')
gives you the immediate number, but you probably want to assert something like cy.get().find(...).should('have.length.greaterThan', 10).its('length').then(n => ...)
better-room-47176
12/15/2022, 11:49 AMbetter-room-47176
12/15/2022, 11:50 AMbetter-room-47176
12/15/2022, 11:51 AMgray-kilobyte-89541
12/15/2022, 11:51 AMbetter-room-47176
12/15/2022, 11:52 AMbetter-room-47176
12/15/2022, 11:52 AMfresh-doctor-14925
12/15/2022, 11:54 AMcy.session()
? That's what the previous cookie api was deprecated in favour ofbetter-room-47176
12/15/2022, 11:55 AMbetter-room-47176
12/15/2022, 11:55 AMbetter-room-47176
12/15/2022, 11:58 AMbetter-room-47176
12/15/2022, 11:59 AMadventurous-eve-81295
12/15/2022, 12:11 PMadventurous-eve-81295
12/15/2022, 12:11 PMadventurous-eve-81295
12/15/2022, 12:14 PMadventurous-eve-81295
12/15/2022, 12:14 PMfresh-doctor-14925
12/15/2022, 12:32 PMgray-kilobyte-89541
12/15/2022, 12:38 PMcy.get('button').click().should('not.exist')
incalculable-honey-17833
12/15/2022, 1:40 PMlate-planet-4481
12/15/2022, 2:48 PM.eq(x)
to pick one by index, or you can use .each()
to iterate over each of them.
So here's an example for you:
js
cy.get('.button').find('.blueBorder').each(($el) => {
cy.wrap($el).click()
})
late-planet-4481
12/15/2022, 3:02 PMcy.intercept()
in this case. Something like this...
js
cy.intercept('yourXhrCallToDeleteARow').as('delete')
cy.get('.button').find('.blueBorder').each(($el) => {
cy.wrap($el).click()
cy.wait('@delete')
})
gray-kilobyte-89541
12/15/2022, 4:11 PMabundant-tailor-4878
12/15/2022, 9:04 PMabundant-tailor-4878
12/15/2022, 9:07 PMincalculable-rainbow-43330
12/16/2022, 7:28 AM