A generic validate tag used to validate HTML.
If no attributes are set, then no validation occurs. If
no validation occurs, then this tag will fail.
To validate a page with the title Yo World!:
<htmlunit-validate
functionId="Verify that the title is 'Yo World!'"
title="Yo World!"/>
If you want a better error message when a failure occurs, then pass in
the msg attribute.
<htmlunit-validate
functionId="Verify that the title is 'Yo World!'"
title="Yo World!"
msg="We must be on the wrong page."/>
If you want validate that some text simple exists on the page anywhere:
<htmlunit-validate
functionId="Verify that 'some text' exists on the current page"
textPresent="some text"/>
If you want to use xpath to validate, then simply use the xpath attribute:
<htmlunit-validate
functionId="Verify that 'some text' exists on the current page"
xpath="//body/table[2]/tr[@id='checking_account' and text=()='234333433']"/>
You can, supply multiple attributes. If you supply multiple attributes
and the msg attribute, then the msg will be used on any failure.