Insert a checkpoint step

Relevant for: GUI tests and components

Checkpoints are usually best inserted after creating an initial test or component.

After you insert a checkpoint step, the checkpoint object is added to the local object repository. You can then move it to a shared object repository.

Tips before you start

Bitmap checkpoints

Object visibility

Insert a MakeVisible statement (for relevant environments) prior to your bitmap checkpoint step to ensure that the object to capture is always fully visible on the screen.

For more details, see the UFT One Object Model Reference for GUI Testing.

Multiple objects To create a bitmap checkpoint that contains multiple objects, select the highest level object that includes all the objects to include in the bitmap checkpoint.

Text / Text area checkpoints

Before you create a text or text area checkpoint for a Windows-based application, make sure you configure the required capture settings in the Text Recognition pane (Tools > Options > GUI Testing tab > Text Recognition node.

Image, table, page, and PDFPage checkpoints

Image, table, page, and PDFPage checkpoints are only available in tests and scripted GUI components.

However, if you select a Web page, a PDF page, or any table object when creating a standard checkpoint for your component, you can check their object properties like any other object.

Reusing checkpoints

Consider creating checkpoints that can be reused, such as when checking generic content or the state of your application.

Example:  

  • If each page of your application contains your organization's logo, reuse a bitmap checkpoint to verify each occurrence in the application.

  • If your application contains multiple edit boxes, reuse a checkpoint to confirm the enabled status of these edit boxes throughout your test.

For details of how to insert existing checkpoints, see Add Existing Checkpoint Dialog Box.

Back to top

Global checkpoint options

Set checkpoint options in the Web > Advanced pane of the Options dialog box (Tools > Options > GUI Testing tab > Web > Advanced node.

You have the following options:

  • Create a page or accessibility checkpoint for each page in a recording session

  • Ignore automatic page checkpoints when running tests

Back to top

Insert a checkpoint step while recording

  1. Start a recording session before inserting a checkpoint. Checkpoints can be viewed in the following recording modes:

    Simple Mode

     Displays only the basic properties and expected values of the checkpoint.

    Advanced Mode

     Displays all supported properties and expected values of the checkpoint.

  2. Do one of the following:

    In the Record toolbar ... ... Click the Insert Checkpoint or Output Value button and select the type of checkpoint from the drop-down list.
    Select Design > Checkpoint ... ... And choose the relevant type of checkpoint.
  3. UFT One is hidden, and the pointer changes to a pointing hand. In your application, click the object that you want to check.

    Note: If the object in your application is associated with more than one location, the Object Selection dialog box opens.

    This dialog box enables you to select an object to check from the object tree.

Back to top

Insert a checkpoint step while editing

  1. For standard checkpoints, make sure the object is visible in your application.

  2. Select the step where you want to add the checkpoint and do one of the following:

    • Select Design > Checkpoint, and then select the relevant checkpoint option.

    • Select Design > Checkpoint > Existing Checkpoint.

    • Select Design > Database Checkpoint

    • Select Design > File Content Checkpoint

    • Select Design > XML Checkpoint

    • Right-click any object in the Active screen and select the relevant checkpoint.

      You can create checkpoints for any object in the Active Screen even if the object is not part of any step in the Keyword View. The Active Screen is not supported for file content or XML checkpoints.

      If you use the Active Screen to insert a checkpoint, ensure that the Active Screen contains sufficient data for the object you want to check.

      Note: If the object in your application is associated with more than one location, the Object Select Dialog Box opens.

      This dialog box enables you to select an object to check from the object tree.

    See additional details in Notes per checkpoint type.

Notes per checkpoint type

Table

When inserting a table checkpoint, for certain objects in certain environments, before the Table Checkpoint Properties dialog box opens, the Define/Modify Row Range Dialog Box opens.

In this dialog, select the row range to check.

Text / Text area
  • To create the checkpoint, first highlight a text string in the Active Screen then right-click the string, and select Insert Text Checkpoint.
  • When you create a text area checkpoint, you first define the area containing the text you want UFT One to check.

    When you select the Text Area Checkpoint option, the mouse turns into a crosshairs pointer. Click and drag the crosshairs point to define this area. Release the mouse button after outlining the area required.

    Hold down the left mouse button and use the arrow keys to make precise adjustments to the defined area.

File content

The source file must be located on the file system.

When inserting a file content checkpoint, by default the File Content Checkpoint Properties dialog box displays only the option to select All Supported Files.

When this is selected, only files with the expected extensions are displayed (for example, .htm or .pdf files).

To select a file that uses a non-standard extension, select All Files in the Files of type box and then select the relevant file.

Database

When inserting a database checkpoint, the Database Query Wizard opens.

  1. In the Database Query Wizard, define the query for your checkpoint using Microsoft Query or by manually entering a database connection and SQL statement.

  2. If you selected Microsoft Query as your data source, Microsoft Query opens, enabling you to define a query. When you are done, in the Finish page of the Query Wizard, use one of the following:

    • Exit and return to UFT One. Exits Microsoft Query.
    • View data or edit query in Microsoft Query. View or edit the query prior to exiting Microsoft Query.
  3. If you selected Specify SQL statement manually, in the Specify SQL statement page that opens, enter the connection and the SQL statement.

    If the Multi-Factor Authentication mode is enabled in your database, you can connect to your database:

    1. Download and install the latest ODBC driver (Microsoft ODBC Driver Download Site).

    2. Enter the connection by doing one of the following:

    3. Specify the SQL statement.

Back to top

Use programming to insert checkpoints

  • To retrieve the return value of a checkpoint (a boolean value that indicates whether the checkpoint passed or failed), add parentheses around the checkpoint argument in the statement in the Editor. For example:

    a = Browser("MyBrowser").Page("MyPage").Check (CheckPoint("MyProperty"))
  • You can also use the CheckProperty method and the CheckItemProperty method to check specific property or item property values. For details, see the specific object methods and properties in the UFT One Object Model Reference for GUI Testing.

Back to top

Checkpoint properties

In the Checkpoint Properties Dialog Box, specify the settings for the checkpoint object, depending on the type of checkpoint:

Table checkpoint settings

Define the cell selection for the table object in the Grid area of Table Checkpoint Properties dialog box, as follows:

To: Do this:
Add a single cell to or remove it from the check Double-click the cell
Add an entire row to or remove it from the check Double-click the row header
Add an entire column to or remove it from the check Double-click the column header.
Add all cells to or remove all cells from the check Double-click the column header.
Add a range of cells to the check Select the cells to add to the check and click the Add to Check button
Remove a range of cells from the check Select the cells to remove from the check and click the Remove from Check button

Database checkpoint settings

Define the cell selection for the database object in the Grid area of Database Checkpoint Properties dialog box, as follows:

To: Do this:
Add a single cell to or remove it from the check Double-click the cell
Add an entire row to or remove it from the check Double-click the row header
Add an entire column to or remove it from the check Double-click the column header.
Add all cells to or remove all cells from the check Double-click the column header.
Add a range of cells to the check Select the cells to add to the check and click the Add to Check button
Remove a range of cells from the check Select the cells to remove from the check and click the Remove from Check button

To modify the SQL query definition, in the Keyword View or Editor, right-click the database object that you want to modify and select Object Properties.

File content checkpoint settings

In the File Content Checkpoint Properties dialog box, scroll to each line you want to compare and select it.

As you hover over a line, a checkbox and a regular expression icon are displayed in the sidebar to the left of that line.

  • Click the check box to select (or clear) the line for verification.

  • Click the Treat Line as Regular Expression/Plain Text button to add (or remove) backslashes prior to all special characters in that line. You can then modify any regular expressions, as needed.

    Note: If the source file contains multiple ages, the File Content Editor is divided into separate pages.

    You can then expand or collapse the pages, select or clear entire pages for verification.

Back to top

See also: