views:

30

answers:

1

Hi all,

I'm a month-old with Selenium and so far all I use is the IDE. Haven't had the luxury of reading on RC (although I will be after this critical project). Anyway I would like to know how I could click the radio button beside a search result w/c does not always appear on the same position. W/ my limited knowledge in Selenium and programming, best solution I can think of is veryfyTextPresent on the text of the result then click blindly a couple of positions beside the text using xPath (? is this even doable ?). How could I do this in a less primitive manner?

So in this scenario I would verify Bingo! then would like to click on the radio button beside it
O xxxxxxxx
O xxxxxxxx
O xxxxxxxx
O Bingo!
O xxxxxxxx
O xxxxxxxx

However on different searches this could look like this
O Bingo!
O xxxxxxxx
O xxxxxxxx
O xxxxxxxx
O xxxxxxxx
O xxxxxxxx

Anyway I hope I've explained my problem clearly. Thanks in advance for all your comments, suggestions and guides. :)

A: 

Try using firebug to investigate any additional distinguishing properties for the radio button. If they do exist, use them to construct a CSS identifier. If not, (and if possible), ask the developer to add properties. Alternately, try posting the HTML tags from firebug for the radio button here..

Rajat
Hi Rajat. Here's the HTML tag for the radio button. As you can see the ID is incremental depending on the number of records selected. And since records are pretty much random posting I can't quit pinpoint the exact radio button for a specific record that I'm searching for. Thanks for the tip! :)
Tatchung
<input type="radio" value="6" title="Select" id="OfficeMaintenance:OfficeUsersTable:6:_id64" name="OfficeMaintenance:OfficeUsersTable:selected"><label class="x4e" for="OfficeMaintenance:OfficeUsersTable:6:_id64">Select</label>
Tatchung