Updating Web Comparison Elements

Applies to TestComplete 15.63, last modified on April 10, 2024

Web Comparison elements of the WebTesting collection are used to compare the tested web page with a stored page.

You can update the HTML data stored in Web Comparison elements replacing it with new data in the Web Comparison Element editor, from tests or from the test log.

Updating Web Comparison Elements in the Web Comparison Element Editor

To update the stored data of the desired Web Comparison element, click Update in the Web Comparison Element editor.

TestComplete will load data from the web page specified in the Source page edit box and store it in the element.

Updating Web Comparison Elements From Tests

You can update the stored data of a Web Comparison element by using the Compare or Check method of the WebComparison object or by using web comparison checkpoints.

Usually, these methods and checkpoints are used to compare a web page with a stored page. However, they can also replace the page’s HTML source code and the path to the web page object that are stored in the Web Comparison element with the data of the specified web page instead of comparing them.

To make it possible to update stored web page data, you need to enable the Update WebTesting elements option in the Stores Options dialog. When this option is enabled, the method and checkpoints retrieve the HTML source code of the web page specified by the method's or checkpoint’s parameters and store them in the Web Comparison element replacing the stored data with the new one.

To update Web Comparison elements from keyword tests, use the Web Comparison Checkpoint operation, or call the WebComparison.Compare or WebComparison.Check method by using the Call Object Method, Run Code Snippet or Run Script Routine operation.

Updating Web Comparison Elements From Logs

If a web comparison checkpoint that uses a Web Comparison element fails during the test run, you can update the Web Comparison element’s contents from the test log. For information on how to do this, see Updating Web Comparison Checkpoints.

See Also

About WebTesting Collection
About Web Accessibility Checkpoints
About Web Comparison Checkpoints

Highlight search results