Thursday, June 4, 2009

Select a Radio Button Option

'The following example uses the Select method to check if a radio group
'has the value of "Two", and, if not, selects the "Two" radio button.
Sub Select_Example2()

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
end sub


'The following example uses the Select method to select the Window
'item in a Web radio group in the seating preference section of
'the Mercury Tours application.
Sub Select_Example1()
Browser("Mercury Tours").Page("Find Flights").WebRadioGroup("seat pref").Select "Window"
End Sub


'selectin radion buttons from google home page
Browser("MonsterIndia.com - More_2").Page("Google").WebRadioGroup("meta").Select "#0" 'selecting "the web"
Browser("MonsterIndia.com - More_2").Page("Google").WebRadioGroup("meta").Select "cr=countryIN" ' selecting "pages from india"

'some of the inportant properties
items count
selected item index
all items
type :radio

No comments:

Post a Comment