back to nexaweb
search
Close source view

  1. ' get the app script object
  2. Set appObj = Browser("Welcome To Nexaweb").Page("Welcome To Nexaweb").JavaApplet("DefaultJvmDetector").Object.getScriptObject()
  3.  
  4. ' get the comobox script object
  5. Set comboBox = appObj.findObjectById("combobox")
  6.  
  7. ' fire double click on the combobox to select all the text in the textfield
  8. comboBox.fireDoubleClick
  9.  
  10. ' enter in the new text of the combobox
  11. comboBox.enterText( "New Text" )
  12.  
  13. ' fire the enter key, to end editing and fire the onCommand() event of the comboBox
  14. appObj.fireKey("enter")
  15.  
  16. ' get the text of the label
  17. Set labelObj = appObj.findObjectById("mylabel")
  18. labelText = labelObj.getText()
  19.  
  20. ' check the text to see if it is as expected
  21. if( labelText <> "New Text" ) Then
  22.     Reporter.ReportEvent micFail,"Check Label", "Unexpected Label Text"
  23. Else
  24.     Reporter.ReportEvent micPass,"Check Label", "Label Text was as expected"
  25. End If
  26.  

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