back to nexaweb
search
Close source view

  1. ' get the app object
  2. Set appObj = Browser("Welcome To Nexaweb").Page("Welcome To Nexaweb").JavaApplet("DefaultJvmDetector").Object.getScriptObject()
  3.  
  4. ' get the button group
  5. Set buttonGroup = appObj.getButtonGroup("group1")
  6.  
  7. ' get the selected button
  8. Set buttonObj = buttonGroup.getSelectedButton()
  9.  
  10. ' get the text of the button and check
  11. buttonText = buttonObj.getText()
  12. if( buttonText <> "Radio 1" ) then
  13.     Reporter.ReportEvent micFail,"Selected Button", "Expected Radio 1.   Acutal is "+buttonText
  14. else
  15.     Reporter.ReportEvent micPass,"Selected Button", "Radio 1 is selected."
  16. End if
  17.  
  18. ' select the button to get focus to the button group
  19. buttonObj.click
  20.  
  21. ' navigate to and select RadioButton 3
  22. appObj.fireKey( "Down" )
  23. appObj.fireKey( "Down" )
  24. appObj.fireKey( "Space" )
  25.  
  26.  
  27. Set buttonObj = buttonGroup.getSelectedButton()
  28. ' get the text of the button and check
  29. buttonText = buttonObj.getText()
  30. if( buttonText <> "Radio 3" ) then
  31.     Reporter.ReportEvent micFail,"Selected Button", "Expected Radio 3.   Acutal is "+buttonText
  32. else
  33.     Reporter.ReportEvent micPass,"Selected Button", "Radio 3 is selected."
  34. End if

© Copyright 2005-2008 Nexaweb Technologies Inc. All Rights Reserved.