Generating an HTML Text-Verification Function

The WebVerifyTable function verifies text selected within an HTML table cell in Rendered view. TrueLog Explorer automatically identifies the HTML table as well as the row and column of the selected cell.

  1. In the menu tree, select the Web page that you want to verify.
  2. In Rendered view, select the relevant text in a table cell.
  3. Perform one of the following:
    • Choose Script > Verify Selected Text in HTML Table .
    • Click Add Verifications and select Verify selected text in HTML table on the Workflow - Add Verifications dialog box.
    The selected row and column are displayed in the Verify that list boxes. Specify a different row or column as required.
  4. From the list box, select one of the following choices:
    • is equal to
    • is different from
    • contains
    • does not contain
    The selected text is displayed in the value text box, and the value option button is selected.
  5. Optional: To verify against an existing parameter or a new parameter, click the parameter value option button.
    1. Click [...] to browse to and select a parameter.
    2. If no parameters exist, click Next to open the Parameter Wizard and create a new parameter.
  6. Specify whether the verification is to be Case sensitive.
  7. In the Severity group box, specify the severity that should be raised if the verification returns a negative result.
  8. Click OK. The function is then added to your test script.

Code Example

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

transaction TMain 
begin
  ...
  WebVerifyTable(7, 3, 1, "115.8", 
    WEB_FLAG_IGNORE_WHITE_SPACE |    
    WEB_FLAG_CONTAINS | WEB_FLAG_CASE_SENSITIVE, 
    NULL, SEVERITY_ERROR, bVerifyTableSuccess1);
  WebPageLink("Add to basket", "ShopIt - Basket");
  ...