by  Adam S Monday, October 21, 2013
Sometimes you need to be able to test the state of a specific Win32 object in Rapise to see if it is enabled, disabled, is activated, etc. This sample illustrates how to get the numeric and textual value of the object's state.

To get the state of an object in Rapise, please do the following:

  1. Start the application being tester.
  2. Learn the object that you want to get the state of using Record/Learn.
  3. Once you have learned the object, use the following code to display the numerical and textual value of its state:

 //This sample illustrates how to access the object state of an Accessible (MSAA) Win32 object
 //It uses the Two Dialogs sample application that ships with Rapise.

 //First get the object state as a number using the normal GetState() function:
 //Next get the object state as a string using the private stateString property:
 var ao = SeS('Please_enter_your_name_');
 var state = ao.stateString;


Article Info
  • Last Updated: 10/21/2013
  • Article ID: KB63
  • Views: 1491