I have a radio element <input type="radio" name="gender" value="male" />
below is my cypress code
cy.getAllByRole("radio").first().click()
how do I get the value attribute of the radio element? something like this
const radioValue = cy.getAllByRole("radio").first().getValue() //"male"
You can try this: