I'm trying to retrieve several input values from Cypress, ideally as an array. For instance, if I have:
<input type="email"> <input type="password"> Assuming that these fields are already filled with the values "[email protected]" and "mypassword", I'd like to get the array ["[email protected]","mypassword"] as a result.
I've tried:
cy.get("input").each($el => $el.text()) But, as indicated in Cypress docs, the "each" function always returns the elements it was called with, no matter what's returned from it. I've tried other solutions but nothing seems to work.
How would you go about doing this? Thanks in advance.