Share
Go down
jitin singh
Posts : 1
Join date : 2012-03-30
Age : 35
Location : New Delhi

problem in selecting radio button in selenium RC

on 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.


Last edited by jitin singh on Fri Mar 30, 2012 2:26 pm; edited 1 time in total (Reason for editing : typo)
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: problem in selecting radio button in selenium RC

on 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]

_________________
Radical QA
http://radical-qa.blogspot.in/
Back to top
Permissions in this forum:
You cannot reply to topics in this forum