Checkpoints verify that the value of a property in an application window or control matches an expected value.
During recording, QA Wizard Pro captures properties of windows and controls in the application. These properties are saved in the application repository and used during playback to locate objects. If the script interacts with a window or control and the value of one of the properties used as search criteria changes, the script fails. If a property that is not used as search criteria changes, the script continues.
You can use checkpoints to check any window or control property, even if it is used as search criteria, and fail the script if the expected and actual values do not match. The available properties vary based on the type of control. Checkpoints can help you verify both the tested application's user interface and its internal structure. For example, you can check that a window includes the correct buttons on the title bar or check a text field to make sure that it is in the correct location relative to the parent window.
Note: If windows or controls are added to an application after recording the script, you may need to capture the new objects before you can create checkpoints for them. You can record a new script to capture the objects or populate the repository to add windows and controls without recording.
1. Select the script line above where to add the statement.
2. Choose Script > Add Statement.
The Add Statement dialog box opens.
3. Select Checkpoint in the Checkpoint category.
4. The Application/version field is automatically set with the context. This information is used to populate the Window and Control fields on the Add Statement dialog box with values from the application repository.
If QA Wizard Pro cannot identify the context, None is selected. This usually occurs when you add statements to a utility script that is only called by other scripts because the context is set in the script that calls it. If an application/version is required, select it from the list.
5. Select the Window to check.
A screenshot of the selected window is displayed.
6. If you are creating a control checkpoint, select the Control to check.
The selected control is outlined with a red box in the screenshot.
7. If you are creating a context menu item checkpoint, select Context Menu Item.
8. Select Item within to check items in a combo box, menu, list box, tab, or tree. You can use a text string (default), expression, datasheet column value, variable, or function that returns the value.
9. Select the Property to check. The available properties change based on the selected window or control. You can use a constant (default), a text string, an expression, a datasheet column value, a variable, or a function that returns the value.
Note: If you need to create an HTML table checkpoint, see Creating HTML table checkpoints.
10. Enter or select the Expected Value to compare against the actual value. You can use a text string (default), expression, datasheet column value, variable, or function that returns the value.
11. Expand the Advanced options to indicate what happens if the checkpoint fails.
12. Click OK to add the statement to the script.