* @param id HTML element id
* @param regex expected regex
* @throws Exception
*/
private void checkTextRegex(WebResponse resp,String id,String regex) throws Exception {
HTMLElement element = resp.getElementWithID(id);
assertNotNull(element);
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(element.getText());
if (!matcher.matches())
{
fail(element.getText()+" did not match "+regex);
}
}