Wednesday 19 March 2014

How to select the second Radio button from Group of Web Radio button using QTP script


Method 1:

Find the "Value" property of the second radio option from web Radio Button Group using Object Spy. Then using below script we can select the perticular radio option from web radio button

Ex: "Value" property of second radio button = "Two"

Browser("All types of radio buttons").Page("All types of radio buttons").WebRadioGroup("MYRADIO").Select "Two"

Method 2:

 we can find the value property and select the second radio button option using below QTP script


CurrentValue = Browser("All types of radio buttons").Page("All types of radio buttons").WebRadioGroup("MYRADIO").GetTOProperty("value")

If CurrentValue <> "Two" Then
Browser("All types of radio buttons").Page("All types of radio buttons").WebRadioGroup("MYRADIO").Select "Two"
End If

No comments:

Post a Comment