Package com.xceptance.xlt.api.validators
Class XHTMLValidator
- java.lang.Object
-
- com.xceptance.xlt.api.validators.XHTMLValidator
-
public class XHTMLValidator extends java.lang.ObjectThis validator executes JTidy to check the returned HTML code for standard conformance. It supports different level of stoppage in case of validation problems.
-
-
Constructor Summary
Constructors Constructor Description XHTMLValidator(boolean breakOnErrors, boolean breakOnWarnings)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XHTMLValidatorgetInstance()Returns the default instance of this validator.voidvalidate(LightWeightPage page)Validates the specified lightweight HTML page.voidvalidate(java.lang.String content)Does the validation and raises an exception if configured.voidvalidate(HtmlPage page)Validates the specified HTML page.
-
-
-
Method Detail
-
validate
public void validate(HtmlPage page) throws java.lang.Exception
Validates the specified HTML page.- Parameters:
page- the page to check- Throws:
java.lang.AssertionError- if the page fails validationjava.lang.Exception
-
validate
public void validate(LightWeightPage page) throws java.lang.Exception
Validates the specified lightweight HTML page.- Parameters:
page- the page to check- Throws:
java.lang.AssertionError- if the page fails validationjava.lang.Exception
-
validate
public void validate(java.lang.String content) throws java.lang.ExceptionDoes the validation and raises an exception if configured. You can use this method directly, but it is encouraged to use the default validator method instead.- Parameters:
content- the page to validate- Throws:
java.lang.Exception- an exception in case of an error
-
getInstance
public static XHTMLValidator getInstance()
Returns the default instance of this validator.Note, that the default validator will stop on ALL errors and ALL warnings.
- Returns:
- the default instance
-
-