Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have multiple radio buttons i need to select a radio
buton and i dont want to hard code i have a generic
function for it there i have used select#0 so it selects
first radio button but for other script i want to select
the 4th radio button how i can make it still more generic

Answer Posted / menaka

count the radiobutton in the appliation and u can select
the last radio button or the u can select radiobutton
randomly.

here is the code..

Set desc=description.Create()
desc("micclass").value="WebRadioGroup"
Set radio=Browser("...").Page("..").ChildObjects(desc)
radiocount=radio.count
msgbox radiocount

For i=o to radiocount-1
itemcount=radio.item(i).GetRoProperty("items count")
msgbox "item count:" & itemcount

Next

'FOR SELECTING THE LAST RADIO BUTTON
variable1="#" & itemcount-1

'so use the variable1 wherever u want to select the item.

'RADOM SELECTION OF RADIO BUTTON

variable2=RandomNumber(0,(itemcount-1))
randselection="#" & variable2

'use variable2 where ever u want to select the radiobutton
randomly.

Is This Answer Correct ?    26 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the differences are and best practical application of Object Repository?

1141


Why is Client side image is preferred over server side image?

1902


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

2135


What does mean by Scope of Automation?n How we defined it?

2046


How does you pass optional arguments in qtp?

1038


How you can delete excel file in qtp?

1075


What is the parameterization?

1046


Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?

2387


write the vb script for call to new action in qtp?

2290


Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?

1034


How to test fly out menu in qtp?

977


What is TOM in QTP?

2225


Is it possible to use two instances of UFT on the same machine? If not why?

1128


How to save your test using quicktest professional (qtp)?

1110


1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?

2110