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

Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

2503


what is profile tool?

2326


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

2020


Define Environment Variable in UFT and its uses?

1115


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

2112


What are the ordinal identifiers in web page?

1217


how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0

1950


what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana

1989


Tell me one scenario, the complex functionality you have automated in your project?

2027


what is the diffrence bw qtp architectute and qtp framework?

2048


What do you to script when objects are removed from application?

1120


explain structured testing? plz guys with exp. do answer

1928


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

1042


whare exactly we have to use functions and sub routain

2364


They asked by using qtp recording writing scripting

2631