- jitin singh
- Posts : 1
Join date : 2012-03-30
Age : 42
Location : New Delhi
problem in selecting radio button in selenium RC
Fri Mar 30, 2012 2:25 pm
Hi, I am new bee to Selenium RC. In my current app i am using below code to slelect a radio button:
selenium.click("//table[@id='tblEventType']/tbody/tr/td");
during run time selenium RC/NUnit executed the command but in application radio button is not getting select.
I have also used:
selenium.Click("css=td.textcenter > input[type="radio"]");
but both are not working...Please replied if anyone has the solution.
selenium.click("//table[@id='tblEventType']/tbody/tr/td");
during run time selenium RC/NUnit executed the command but in application radio button is not getting select.
I have also used:
selenium.Click("css=td.textcenter > input[type="radio"]");
but both are not working...Please replied if anyone has the solution.
Re: problem in selecting radio button in selenium RC
Fri Mar 30, 2012 3:28 pm
If there is a only one radio button then - xpath=(//*[@class=" class name"])
Or you can go with this
//input[@name='name_attribute' and @value='value_attribute']
Or
//input[@type='radio'] / xpath=(//input[@type='radio'])
Or by position
//input[@type='radio' and position()=1]
Or you can go with this
//input[@name='name_attribute' and @value='value_attribute']
Or
//input[@type='radio'] / xpath=(//input[@type='radio'])
Or by position
//input[@type='radio' and position()=1]
Permissions in this forum:
You cannot reply to topics in this forum