Handle Radio Buttons
Radio buttons work similarly to checkboxes, but only one can be selected at a time within a group (same name).
On the Radio Buttons page, the single-select group has radio buttons with name="select".
HTML Structure (radio group):
<!-- All radios with the same name form a group -->
<input type="radio" id="firstSelect1" name="select" value="firstSelect1">
<label for="firstSelect1">First Select</label>
<input type="radio" id="secondSelect1" name="select" value="secondSelect1">
<label for="secondSelect1">Second Select</label>
<input type="radio" id="thirdSelect1" name="select" value="thirdSelect1">
<label for="thirdSelect1">Third Select</label>
Task:
- Navigate to
https://testkru.com/Elements/RadioButtons
- Check if
firstSelect1 is selected (should be false)
- Click
firstSelect1 to select it
- Check if
firstSelect1 is now selected (should be true)
- Click
secondSelect1 (same group) and check both states
Expected output:
First initially: false
First after click: true
After selecting second - First: false
After selecting second - Second: true