Web Comparison Checkpoint Operation

Applies to TestComplete 14.61, last modified on April 22, 2021

Description

Use the Web Comparison Checkpoint operation to compare the contents of a web page against a baseline copy of data stored in your project, or to update the baseline copy with the page data retrieved from a database. The functioning mode of the operation is specified by the Update WebTesting elements setting (you can modify it in the Stores Options dialog). By default the setting is disabled, and the operation performs the comparison. If the setting is enabled, the operation updates the stored baseline copy.

When you add the operation to your test, TestComplete displays the Checkpoint dialog, where you specify the tested web page, the comparison settings and the name of the Web Comparison project element that stores the baseline data for comparison. If the operation works in comparison mode, TestComplete will compare the actual contents of the page with this stored data. If the operation works in update mode, TestComplete will update the stored data with the page’s contents.

Requirements

This operation is available only if you have a license for the TestComplete Web module.

Operation Result

In comparison mode, if the comparison procedure reports that the page’s contents coincides with the saved baseline copy, the operation returns True and posts a checkpoint message () to the test log. Otherwise, the operation returns False and posts an error message () to the log.

In update mode the operation always returns True.

Scripting Analogue

The operation is analogue to the WebComparison.Compare and WebComparison.Check scripting methods.

Child Operations

The operation cannot have child operations.

Operation Parameters

The operation uses the following parameters:

Web Comparison Element

Specifies the name of the Web Comparison project element that stores the baseline copy of data to be used for comparison and the comparison settings. The element’s name is shown in the Operation column of the Keyword Test editor. See below for information on how to specify another element. For information on comparison settings, see Web Comparison Checkpoint Settings.

PageObject

A reference to the Page object that provides scripting access to the tested web page. The object name is shown in the Value column of the Keyword Test editor along with other parameters of the operation.

Timeout

Integer. Specifies the number of milliseconds the operation will wait until the specified Page object become available. Use this parameter if the tested web page is not available at the moment of the check, or if the web page contents is generated dynamically for some time after the page is loaded.

By default, Timeout is -1, what means that the waiting time is specified by the Auto-wait timeout project property. If Timeout is 0, the operation does not wait for the page objects.

This parameter is shown in the Value column of the Keyword Test editor along with other parameters of the operation.

You specify the Web Comparison element and the Page object in the Checkpoint dialog that TestComplete calls when you append the operation to your keyword test. These parameters can be modified at any time. To do this, double-click the operation in the Keyword Test editor. This will invoke the Web Comparison Checkpoint dialog in which you can specify a new value for the desired parameter. Other parameters can be modified in the Keyword Test editor or the Operation Parameters dialog (see below).

To specify another Web Comparison element that will be used by the comparison procedure:

  • Select the operation’s row in the test.

  • Select the Operation cell and then click within it or press F2. This will activate the in-place editor.

  • Choose the desired Web Comparison element from the drop-down list.

  • Press Enter to confirm the change and close the in-place editor, or press Esc to close the editor discarding any changes.

-- or --

  • Double-click the desired operation in the Keyword Test editor. This will invoke the Web Comparison Checkpoint dialog.

To change baseline data or comparison settings, modify the Web Comparison element (since the settings are stored in the element). For detailed information see Modifying WebTesting Elements.

To specify the Page object and Timeout parameter:

  • Select the operation in the Keyword Test editor.

  • Select the Value cell and then click within it or press F2. This will activate the in-place editor.

  • Click the ellipsis button of the in-place editor. This will display the Operation Parameters dialog in which you can specify the parameters’ values. For detailed information on setting the values in the dialog, see Specifying Operation Parameters.

  • Click OK to close the dialog and apply changes.

  • Press Enter to confirm the change and close the in-place editor, or press Esc to close the editor discarding any changes.

Remarks

For information on web comparison checkpoints, on creating and modifying them and on how the comparison procedure works, see topics of the About Web Comparison Checkpoints section.

See Also

Checkpoints Category
About Web Comparison Checkpoints
About Web Comparison Element Editor
Modifying WebTesting Elements
Specifying Operation Parameters
Checking Operation Result

Highlight search results