Package com.xceptance.xlt.api.validators
Class HtmlEndTagValidator
- java.lang.Object
-
- com.xceptance.xlt.api.validators.HtmlEndTagValidator
-
public class HtmlEndTagValidator extends java.lang.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HtmlEndTagValidator
getInstance()
Returns the singleton instance.void
validate(LightWeightPage page)
Validates the specified lightweight HTML page.void
validate(java.lang.String content)
The validation as plain string method to be tested and used independently from the page.void
validate(HtmlPage page)
Validates the specified HTML page.
-
-
-
Method Detail
-
validate
public void validate(HtmlPage page)
Validates the specified HTML page.- Parameters:
page
- the page to check- Throws:
java.lang.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:
java.lang.AssertionError
- if the page fails validation
-
validate
public void validate(java.lang.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
-
-