Updating Web Comparison Checkpoints

Applies to TestComplete 15.47, last modified on January 20, 2023

It is a typical situation when you need to update a baseline item used by a checkpoint in order for the checkpoint to pass. TestComplete allows updating the data of web comparison checkpoints at runtime, at design time from the Web Comparison Element editor or from the test log after the test run is over. This topic describes the mentioned approaches in detail.

Updating Checkpoints From the Web Comparison Element Editor

You can easily update web comparison checkpoints from the Web Comparison Element editor. To do this, follow the instructions below:

  1. Make sure that the web page whose contents are verified by the checkpoint is currently opened in one of web browsers supported by TestComplete. For the list of supported browsers, see Supported Web Browsers and Technologies.

  2. Open the Web Comparison element that stores data used by the checkpoint:

    • In the Project Explorer, expand the Stores > WebTesting node and locate the Web Comparison element that stores the data you want to update.

    • Double-click the desired Web Comparison element or right-click the corresponding element and choose Edit from the context menu.

      or  

    • If you call the web comparison checkpoint from a keyword test, right-click the corresponding Web Comparison Checkpoint operation in the test and choose Edit Checkpoint Data from the context menu.

  3. TestComplete will open the element in the Web Comparison Element editor. The editor displays the page’s source code that will be used for verification and the checkpoint settings.

  4. To update the page’s source code, click Update at the top of the editor.

Updating Checkpoints at Runtime

TestComplete lets you update the contents of Web Comparison elements stored in the Web Testing collection directly from your tests.

Web Comparison element data update is supported by the following test operations:

As a rule, these test operations are used to verify the contents of the web page under test by comparing it with the contents of the Web Comparison element, but they can also replace the contents of a stored element with those of the specified web page.

In order to make it possible, you should enable the Update WebTesting elements option:

  1. Select Tools > Options from the TestComplete main menu. This will open the Options dialog.

  2. Select the Engines > Stores category.

  3. Select Update WebTesting elements.

  4. Click OK to close the dialog.

After you run the test that contains any of the above-mentioned test operations, TestComplete will automatically replace the stored element with the contents of the relevant web page.

Updating Checkpoints From the Test Log

When a web comparison checkpoint fails, you can easily update its data from the Test Log panel. For this purpose, follow the steps below:

  1. Select the message informing about the checkpoint failure in the test log.

  2. Switch to the Details panel.

  3. Click the Update the <Checkpoint_name> checkpoint link at the top of the panel.

  4. TestComplete will display a message asking whether you want to update the checkpoint. Click Yes to update the baseline data used for the failed checkpoint. After that, TestComplete will replace the stored Web Comparison element with the corresponding web page’s contents. Click No to close the message without updating the checkpoint.

See Also

Web Comparison Checkpoints
About Web Comparison Checkpoints
About WebTesting Collection
Modifying WebTesting Elements

Highlight search results