Verifying Object Properties

You will perform most of your verifications using properties. When you verify the properties of an object, a VerifyProperties method statement is added to your script. The VerifyProperties method verifies the selected properties of an object and its children.

Each object has many characteristics, or properties. For example, dialog boxes can have the following verification properties:
  • Caption
  • Children
  • DefaultButton
  • Enabled
  • Focus
  • Rect
  • State

Caption is the text that displays in the title bar of the dialog box. Children is a list of all the objects contained in the dialog box, DefaultButton is the button that is invoked when you press Enter, and so on. In your test cases, you can verify the state of any of these properties.

You can also, in the same test case, verify properties of children of the selected object. For example, the child objects in the Find dialog box, such as the text box FindWhat and the check box CaseSensitive,will also be selected for verification.

By recording verification statements for the values of one or more of an object’s properties, you can determine whether the state of the application is correct or in error when you run your test cases.