Is there some way how to select same value in multiple forms (dropdowns)?
value I want to select -> apple every form is starting with -> dropdown_form_
I was thinking about something like:
cy.get('[id^="dropdown_form_"]').select("apple")
but this doesn't work, because you can only call select on single element.
CodePudding user response:
Maybe you just want to apply .each()
command?
cy.get('[id^="dropdown_form_"]')
.each($el => {
cy.wrap($el).select("apple")
})