How do I validate if a particular radio button is not selected
This example demonstrates validating that the radio button is not selected .
In the solution shown below, you will validate that the radio button "Faimly of 3" of the "Number of people on insurance policy:" options in HICC application is NOT selected using "verifyNotChecked" command.
Solution:
# | Command | Target | Value | |
---|---|---|---|---|
Validate that the Radio button "Family of 3" is not selected | ||||
1 | verifyNotChecked | //input[@id="rdo_family3"] |
Tips, Tricks, Gotchas & Best Practices:
- To understand more about selecting a radio button, click here.
- As an alternative, you are encouraged to use the assertNotChecked or waitForNotChecked commands.
- If the above commands fail to verify that the radio button is not checked then you can use the storeEval command as another alternative.