Click here to Skip to main content
15,743,429 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m doing the website automation thru Selenium webdriver in Firefox. Everything is fine but I dont know how to click the radio button.

There are two radio buttons in the web (i) Family Information and (ii) Individual Information. Target information obtained in the Selenium IDE. (i) name=indFamily (ii) document.pebPostLogin.indFamily[1]

I can easily click the first one Family information thru following code:

But dont know the C# command for the second one "Individual Information". I have recorded the actions in Selenium IDE in Firefox and exported into C# file but DOM commands are not exported in C#. Following error message seen in C# file.
// ERROR: Caught exception [Error: Dom locators are not implemented yet!]

Please find below the source code identified thru Firebug.

<input name="indFamily" tabIndex="6" onkeypress="submitOnEnter(window.event.keyCode, document.pebPostLogin)" type="radio" value="Family"/>
<input name="indFamily" tabIndex="7" onkeypress="submitOnEnter(window.event.keyCode, document.pebPostLogin)" type="radio" value="Individual"/>

Please help me out...

1 solution

It has been fixed using Xpath. The code is below:


Thanks to
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900