Class HtmlEndTagValidator

java.lang.Object
com.xceptance.xlt.api.validators.HtmlEndTagValidator

public class HtmlEndTagValidator extends Object
Checks that a page has at least one closing HTML tag. Does not check, that this tag is the only one. It uses a regular expression.

HTML comments are permitted after the closing HTML tag. Anything else will be logged as warning.

It also assumes a lower-case closing HTML tag according to the HTML/XHTML standard.

  • Method Details

    • validate

      public void validate(HtmlPage page)
      Validates the specified HTML page.
      Parameters:
      page - the page to check
      Throws:
      AssertionError - if the page fails validation
    • validate

      public void validate(LightWeightPage page)
      Validates the specified lightweight HTML page.
      Parameters:
      page - the page to check
      Throws:
      AssertionError - if the page fails validation
    • validate

      public void validate(String content)
      The validation as plain string method to be tested and used independently from the page.
      Parameters:
      content - a snippet of HTML code to be checked
    • getInstance

      public static HtmlEndTagValidator getInstance()
      Returns the singleton instance.
      Returns:
      the singleton instance