Generating an HTML Digest Verification Function

The WebVerifyHtmlDigest function calculates and verifies a Web page digest against a precalculated digest. A digest is a character frequency table that is calculated for certain characters within a rendered HTML page. If an HTML document is contained within a frame set, text is verified only for the frame that contains the selected text, not the entire page.

  1. In the menu tree, select the Web page that you want to verify.
  2. Choose Rendered view.
  3. Perform one of the following steps:
    • Choose Script > Verify Page Digest .
    • Click Add Verifications and then click Verify digest on the Workflow - Add Verifications dialog box.
    A name for the digest is displayed in the Constant name text box.
  4. Optional: Edit the Constant name text box.
  5. In the Verify group box, specify how the verification should be applied:
    • All characters
    • Printable characters
    • Alphanumeric characters
  6. In the Severity group box, specify the severity that should be raised if the verification returns a negative result.
  7. Click OK. The function is then added to your test script.

Code Example

The following sample code (in bold) is generated automatically for HTML digest verifications:

const 
  HTML_DIGEST_1     :=
"\h01910000000011D063032CCB7D023EFBBD02000000000000000000000000000000001
602010601010703010108010503020201"
"\h03010201030502010105010403070103010205050402060107050102"; 

transaction TMain
begin 
  ...
  WebVerifyHtmlDigest(HTML_DIGEST_1, 79, 0, 0, NULL, 
    SEVERITY_ERROR);    
  WebPageLink("Check out", "ShopIt - Check Out"); // Link 3
  ...