[Webtest] htmlid validation

Lisa Crispin Lisa Crispin" <lisa.crispin@gmail.com
Tue, 23 Sep 2008 10:43:23 -0600


------=_Part_17788_12654382.1222188203045
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

------=_Part_17788_12654382.1222188203045
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Our app uses Spring velocity macros (I think that&#39;s the right terminology) to generate HTML. In one new page in the UI, it&#39;s generating ids and names that look like this:<br><br>id=&quot;docProviderIds[&#39;aaa&#39;]&quot;<br>
<br>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&#39;t complain about the quotes, but about the bracket:<br>
<br>
<i><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">character &quot;[&quot; is not allowed in the
value of attribute &quot;ID&quot;</span></i><br>We have lots of pages where the html ID and name have square brackets, but WebTest never had a problem with those<br><br>Are we wrong about the single quote within the double quote? WebTest (or HtmlUnit) really unhappy with the brackets? But if that&#39;s the case, why doesn&#39;t it complain about them in many other pages for which we have scripts?<br>
<br>Is there any way to tell WebTest or HtmlUnit to ignore certain things in the HTML, relax the validation, as it were (I don&#39;t think so, but I thought I&#39;d ask).<br><br>Thanks,<br>Lisa<br><i><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></i><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><br clear="all">
</span><br>-- <br>Lisa Crispin<br>Co-author with Janet Gregory, Agile Testing<br><a href="http://www.agiletester.ca">http://www.agiletester.ca</a><br><a href="http://lisa.crispin.home.att.net">http://lisa.crispin.home.att.net</a><br>
<a href="http://lisacrispin.blogspot.com">http://lisacrispin.blogspot.com</a><br>
</div>

------=_Part_17788_12654382.1222188203045--