Select Radio Buttons
Radio buttons use the same .check() method as checkboxes. Only one radio in a group can be selected at a time.
On the Radio Buttons page, the first row is one group: #firstSelect1, #secondSelect1, and #thirdSelect1 all share name="select".
Task:
- Navigate to
https://testkru.com/Elements/RadioButtons - Check radio
#firstSelect1 - Print whether
#firstSelect1is checked - Check radio
#secondSelect1(selecting a different one in the same group) - Print whether
#firstSelect1is still checked - Print whether
#secondSelect1is checked
Expected output:
First radio checked: true First after switching: false Second radio checked: true
TestKru