Reputation: 11
Im new in UFT. How can I select a radiobutton in a webradiogroup? I have to determine first if the status is available and select the first availablr in the radibutton. TAKE NOTE every date i have selected the available status beside radiobutton is changing.
Upvotes: 0
Views: 1380
Reputation: 121
If you don't care about the value you select try this:
'Always select the first value
Browser("index:=0").Page("index:=0").WebRadioGroup("name:=[RadioGroupName]").Select "1"
If you need to extract the values from the group and parse for a specific one you could pull all the values
values = Browser("index:=0").Page("index:=0").WebRadioGroup("name:=[RadioGroupName]").GetROProperty("innertext")
and then make an array and parse that:
arr = split(values, ";")
For more advanced techniques I'd recommend buying a copy of Tarun Lalwani's QTP Unplugged books: QTP Descriptive Programming Unplugged: Master Object Identification Techniques or QuickTest Professional Unplugged (2nd Ed.)
Most of the code samples in these books still work in the MicroFocus' modern UFT 14.53 tool.
Upvotes: 1