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
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent
Difference between test object and run time object?
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?
how to test use the quality control .how to verify the image verification
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls
What are the data types in qtp?
hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u
How to create scenario selector
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
How do Parameterization and Data-Driving relate to each other in QTP?
hai, i completed my b.tech in 2010 with 62.3%. i having knowledge on manual testing and Qtp. i want Relavent experience in testing.watever may be d salary i dont bother..I just want to gain knowledge. i dont have good communication skills.
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
Explain the types of properties that quick test learns while recording?
How to capture all the data of a webtable, weblist and combolist using QTP?