Generating a Text-Verification Function Within Boundaries

The WebVerifyHtmlBound(Ex) function verifies text selected in Rendered view. TrueLog Explorer automatically detects unique boundaries that identify the position of selected text.

Note: With Silk Performer, TrueLog Explorer uses WebVerifyHtmlBoundEx instead of WebVerifyHtmlBound.
  1. In the menu tree, select the Web page that you want to verify.
  2. In Rendered view, select the appropriate text.
  3. Perform one of the following steps:
    • Choose Script > Verify Selected Text .
    • Right-click the selected text and choose Verify Selected Text.
    • Click Add Verifications and choose Verify selected text in HTML page from the Workflow - Add Verifications dialog box.
    The selected text is displayed in the constant value text box, and the constant value option button is selected.
  4. 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.
  5. Check the relevant check boxes to make the verification case-sensitive or to apply it as a script-wide rule. A result variable name is displayed in the Result variable name text box.
  6. Optional: Edit the Result variable name.
  7. Check the Require boundary strings check box. This disables the occurs frequency settings.

    Left and right boundaries appear in the Left boundary and Right boundary text boxes. Boundary strings cannot be edited from this dialog box.

  8. In the Severity group box, specify the severity that should be raised if the verification returns a negative result.
  9. Click OK. The function is then added to your test script.

Code Example

The following sample code (in bold) is generated automatically for HTML text verifications within boundaries:

transaction TMain 
begin
  ...
  WebVerifyHtmlBound("Name:", "Address", "Tester",   
    WEB_FLAG_IGNORE_WHITE_SPACE | WEB_FLAG_CASE_SENSITIVE, 
    NULL, SEVERITY_ERROR, bVerifyHtmlBoundSuccess2);
  WebPageSubmit("Submit", SHOPIT_KINDOFPAYMENT_ASP002”);
  ...