I have multiple div elements with the id features-#####
and features-#####
, where the # is a dynamic figure.
How would I get Cypress to find all elements with the matching part of the id features-
, and then click on the first or second in a programmatic manner?
This is that I have done so far, but I can't figure out hwo to use regex to retrieve all the elements I did then process them programmatically.
describe('builder features component', () => {
it('should allow the user to select a features component', () => {
cy.get(el).should('div.id', /^features-\w+/).first().click();
});
});