About Checking GUI Objects - WinRunner

You can use GUI checkpoints in your test scripts to help you examine GUI objects in your application and detect defects. For example, you can check that when a specific dialog box opens, the OK, Cancel, and Help buttons are enabled.

You point to GUI objects and choose the properties you want WinRunner to check. You can check the default properties recommended by WinRunner, or you can specify which properties to check. Information about the GUI objects and the selected properties is saved in a checklist. WinRunner then captures the current property values for the GUI objects and saves this information as expected results. A GUI checkpoint is automatically inserted into the test script. This checkpoint appears in your test script as an obj_check_gui or a win_check_gui statement.

About Checking GUI Objects

When you run the test, the GUI checkpoint compares the current state of the GUI objects in the application being tested to the expected results. If the expected results and the current results do not match, the GUI checkpoint fails. Your GUI checkpoint can be part of a loop. If a GUI checkpoint is run in a loop, the results for each iteration of the checkpoint are displayed in the test results as separate entries. The results of each iteration of the checkpoint can be viewed in the Test Results window.

Note that any GUI object you check that is not already in the GUI map is added automatically to the temporary GUI map file.

You can use a regular expression to create a GUI checkpoint on an edit object or a static text object with a variable name.

WinRunner provides special built-in support for ActiveX control, Visual Basic, and PowerBuilder application development environments. When you load the appropriate add-in support, WinRunner recognizes these controls, and treats them as it treats standard GUI objects. You can create GUI checkpoints for these objects as you would create them for standard GUI objects. WinRunner provides additional special built-in support for checking ActiveX and Visual Basic sub-objects.

You can also create GUI checkpoints that check the contents and properties of tables.

Setting Options for Failed GUI Checkpoints

You can instruct WinRunner to send an e-mail to selected recipients each time a GUI checkpoint fails and you can instruct WinRunner to capture a bitmap of your window or screen when any checkpoint fails. You set these options in the General Options dialog box.

To instruct WinRunner to send an e-mail message when a GUI checkpoint fails:

  1. Choose Tools > General Options. The General Options dialog box opens.
  2. Click the Notifications category in the options pane. The notification options are displayed.
  3. Select GUI checkpoint failure.
  4. Click the Notifications > E-mail category in the options pane. The e-mail options are displayed.
  5. Select the Active E-mail service option and set the relevant server and sender information.
  6. Click the Notifications > Recipient category in the options pane. The e-mail recipient options are displayed.
  7. Add, remove, or modify recipient details as necessary to set the recipients to whom you want to send an e-mail message when a GUI checkpoint fails.

The e-mail contains summary details about the test and checkpoint and details about the expected and actual values of the property check.

To instruct WinRunner to capture a bitmap when a checkpoint fails:

  1. Choose Tools > General Options. The General Options dialog box opens.
  2. Click the Run > Settings category in the options pane. The run settings options are displayed.
  3. Select Capture bitmap on verification failure.
  4. Select Window, Desktop, or Desktop area to indicate what you want to capture when checkpoints fail.
  5. If you select Desktop area, specify the coordinates of the area of the desktop that you want to capture.

When you run your test, the captured bitmaps are saved in your test results folder.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics