Understanding GUI Checkpoint Statements - WinRunner

A GUI checkpoint for a single object appears in your script as an obj_check_gui statement. A GUI checkpoint that checks more than one object in a window appears in your script as a win_check_gui statement. Both the obj_check_gui and win_check_gui statements are always associated with a checklist and store expected results in a expected results file.

  • A checklist lists the objects and properties that need to be checked. For an obj_check_gui statement, the checklist lists only one object. For a win_check_gui statement, a checklist contains a list of all objects to be checked in a window. When you create a GUI checkpoint, you can create a new checklist or use an existing checklist.
  • An expected results file contains the expected property values for each object in the checklist. These property values are captured when you create a checkpoint, and can later be updated manually or by running the test in Update mode. For more information, see “Running a Test to Update Expected Results”. Each time you run the test, the expected property values are compared to the current property values of the objects.

The obj_check_gui function has the following syntax:

obj_check_gui ( object, checklist, expected results file, time );

The object is the logical name of the GUI object. The checklist is the name of the checklist defining the objects and properties to check. The expected results file is the name of the file that stores the expected property values. The time is the interval marking the maximum delay between the previous input event and the capture of the current property values, in seconds. This interval is added to the timeout_msec testing option during the test run.

For example, if you click the OK button in the Login window in the Flight application, the resulting statement might be:

obj_check_gui ("OK", "list1.ckl", "gui1", 1);

The win_check_gui function has the following syntax:

win_check_gui ( window, checklist, expected results file, time );

The window is the logical name of the GUI window. The checklist is the name of the checklist defining the objects and properties to check. The expected results file is the name of the file that stores the expected property values. The time is the interval marking the maximum delay between the previous input event and the capture of the current property values, in seconds. This interval is added to the timeout_msec testing option during the test run.

For example, if you click the title bar of the Login window in the sample Flight application, the resulting statement might be:

win_check_gui ("Login", "list1.ckl", "gui1", 1);

Note that WinRunner names the first checklist in the test list1.ckl and the first expected results file gui1.


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

WinRunner Topics