Skip to content

How do I validate if a particular radio button is selected

This example demonstrates validating the selected radio .

In the solution shown below, you will validate that the radio button "Faimly of 2" of the "Number of people on insurance policy:" options in HICC application is selected using "verifyChecked" command.

Solution:

# Command Target Value
Validate that the Radio button is selected
1 verifyChecked //input[@id="rdo_family2"]  

Tips, Tricks, Gotchas & Best Practices:  

  • To understand more about selecting a radio button, click here.
  • As an alternative, you are encouraged to use the assertChecked or waitForChecked commands.
  • If the above commands fail to verify that the radio button is checked then you can use the storeEval command as another alternative.

Feedback and Knowledge Base