' get the app object
Set appObj = Browser("Welcome To Nexaweb").Page("Welcome To Nexaweb").JavaApplet("DefaultJvmDetector").Object.getScriptObject()
' get the button group
Set buttonGroup = appObj.getButtonGroup("group1")
' get the selected button
Set buttonObj = buttonGroup.getSelectedButton()
' get the text of the button and check
buttonText = buttonObj.getText()
if( buttonText <> "Radio 1" ) then
Reporter.ReportEvent micFail,"Selected Button", "Expected Radio 1. Acutal is "+buttonText
else
Reporter.ReportEvent micPass,"Selected Button", "Radio 1 is selected."
End if
' select the button to get focus to the button group
buttonObj.click
' navigate to and select RadioButton 3
appObj.fireKey( "Down" )
appObj.fireKey( "Down" )
appObj.fireKey( "Space" )
Set buttonObj = buttonGroup.getSelectedButton()
' get the text of the button and check
buttonText = buttonObj.getText()
if( buttonText <> "Radio 3" ) then
Reporter.ReportEvent micFail,"Selected Button", "Expected Radio 3. Acutal is "+buttonText
else
Reporter.ReportEvent micPass,"Selected Button", "Radio 3 is selected."
End if