[Webtest] htmlid validation

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Wed, 24 Sep 2008 09:17:01 +0200


Hi Lisa,

can you provide the stacktrace of the exception you get?

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

Lisa Crispin wrote:
> Our app uses Spring velocity macros (I think that's the right
> terminology) to generate HTML. In one new page in the UI, it's
> generating ids and names that look like this:
> 
> id="docProviderIds['aaa']"
> 
> My WebTest script gets a Java runtime exception. I presumed this is
> because of the single quotes within the double quotes, as my
> understanding is that this is invalid. However, when we run that page
> through the WC3 validator, it doesn't complain about the quotes, but
> about the bracket:
> 
> /character "[" is not allowed in the value of attribute "ID"/
> We have lots of pages where the html ID and name have square brackets,
> but WebTest never had a problem with those
> 
> Are we wrong about the single quote within the double quote? WebTest (or
> HtmlUnit) really unhappy with the brackets? But if that's the case, why
> doesn't it complain about them in many other pages for which we have
> scripts?
> 
> Is there any way to tell WebTest or HtmlUnit to ignore certain things in
> the HTML, relax the validation, as it were (I don't think so, but I
> thought I'd ask).
> 
> Thanks,
> Lisa
> //
> 
> -- 
> Lisa Crispin
> Co-author with Janet Gregory, Agile Testing
> http://www.agiletester.ca
> http://lisa.crispin.home.att.net
> http://lisacrispin.blogspot.com