[Webtest] htmlid validation

Lisa Crispin Lisa Crispin" <lisa.crispin@gmail.com
Wed, 24 Sep 2008 09:32:03 -0600


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

Sure, here it is, thanks.

c:\eclipse_projects\fast401k\src\web_test\SmokeTest\ManageProductDocuments.xml:51:
Unexpected exception caught: java.lang.RuntimeException
	at com.canoo.webtest.steps.StepUtil.handleException(StepUtil.java:120)
	at com.canoo.webtest.steps.Step.handleException(Step.java:379)
	at com.canoo.webtest.steps.Step.execute(Step.java:110)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
	at com.canoo.webtest.steps.Step.execute(Step.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.RuntimeException: Could not retrieve XPath
>.//input[@type='radio' and @name='docProviderIds['adv']' and
@value='TPA']< on HtmlForm[<form method="post">]
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:85)
	at com.gargoylesoftware.htmlunit.html.DomNode.getByXPath(DomNode.java:1328)
	at com.canoo.webtest.steps.form.SetRadioButton.findFields(SetRadioButton.java:38)
	at com.canoo.webtest.steps.form.AbstractSetFieldStep.doExecute(AbstractSetFieldStep.java:144)
	at com.canoo.webtest.steps.Step.execute(Step.java:101)
	... 58 more
Caused by: javax.xml.transform.TransformerException: Expected ], but found: adv
	at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)
	at org.apache.xpath.compiler.XPathParser.consumeExpected(XPathParser.java:526)
	at org.apache.xpath.compiler.XPathParser.Predicate(XPathParser.java:1935)
	at org.apache.xpath.compiler.XPathParser.Step(XPathParser.java:1724)
	at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1633)
	at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1595)
	at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)
	at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
	at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
	at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
	at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
	at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
	at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
	at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)
	at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)
	at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)
	at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.<init>(XPathAdapter.java:83)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:107)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:63)
	... 62 more
--- Nested Exception ---
java.lang.RuntimeException: Could not retrieve XPath
>.//input[@type='radio' and @name='docProviderIds['adv']' and
@value='TPA']< on HtmlForm[<form method="post">]
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:85)
	at com.gargoylesoftware.htmlunit.html.DomNode.getByXPath(DomNode.java:1328)
	at com.canoo.webtest.steps.form.SetRadioButton.findFields(SetRadioButton.java:38)
	at com.canoo.webtest.steps.form.AbstractSetFieldStep.doExecute(AbstractSetFieldStep.java:144)
	at com.canoo.webtest.steps.Step.execute(Step.java:101)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
	at com.canoo.webtest.steps.Step.execute(Step.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: javax.xml.transform.TransformerException: Expected ], but found: adv
	at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)
	at org.apache.xpath.compiler.XPathParser.consumeExpected(XPathParser.java:526)
	at org.apache.xpath.compiler.XPathParser.Predicate(XPathParser.java:1935)
	at org.apache.xpath.compiler.XPathParser.Step(XPathParser.java:1724)
	at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1633)
	at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1595)
	at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)
	at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
	at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
	at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
	at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
	at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
	at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
	at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)
	at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)
	at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)
	at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.<init>(XPathAdapter.java:83)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:107)
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:63)
	... 62 more




On Wed, Sep 24, 2008 at 1:17 AM, Marc Guillemot <mguillemot@yahoo.fr> wrote:

> 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
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>



-- 
Lisa Crispin
Co-author with Janet Gregory, Agile Testing
http://www.agiletester.ca
http://lisa.crispin.home.att.net
http://lisacrispin.blogspot.com

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

<div dir="ltr">Sure, here it is, thanks.<br><pre style="display: inline;">c:\eclipse_projects\fast401k\src\web_test\SmokeTest\ManageProductDocuments.xml:51: Unexpected exception caught: java.lang.RuntimeException<br>	at com.canoo.webtest.steps.StepUtil.handleException(StepUtil.java:120)<br>
	at com.canoo.webtest.steps.Step.handleException(Step.java:379)<br>	at com.canoo.webtest.steps.Step.execute(Step.java:110)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)<br>	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)<br>
	at com.canoo.webtest.steps.Step.execute(Step.java:101)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)<br>
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>
	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)<br>	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>
	at org.apache.tools.ant.Main.runBuild(Main.java:698)<br>	at org.apache.tools.ant.Main.startAnt(Main.java:199)<br>	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)<br>	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)<br>
Caused by: java.lang.RuntimeException: Could not retrieve XPath &gt;.//input[@type=&#39;radio&#39; and @name=&#39;docProviderIds[&#39;adv&#39;]&#39; and @value=&#39;TPA&#39;]&lt; on HtmlForm[&lt;form method=&quot;post&quot;&gt;]<br>
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:85)<br>	at com.gargoylesoftware.htmlunit.html.DomNode.getByXPath(DomNode.java:1328)<br>	at com.canoo.webtest.steps.form.SetRadioButton.findFields(SetRadioButton.java:38)<br>
	at com.canoo.webtest.steps.form.AbstractSetFieldStep.doExecute(AbstractSetFieldStep.java:144)<br>	at com.canoo.webtest.steps.Step.execute(Step.java:101)<br>	... 58 more<br>Caused by: javax.xml.transform.TransformerException: Expected ], but found: adv<br>
	at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)<br>	at org.apache.xpath.compiler.XPathParser.consumeExpected(XPathParser.java:526)<br>	at org.apache.xpath.compiler.XPathParser.Predicate(XPathParser.java:1935)<br>
	at org.apache.xpath.compiler.XPathParser.Step(XPathParser.java:1724)<br>	at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1633)<br>	at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1595)<br>
	at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)<br>	at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)<br>	at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)<br>
	at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)<br>	at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)<br>	at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)<br>
	at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)<br>	at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)<br>	at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)<br>
	at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)<br>	at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)<br>	at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.&lt;init&gt;(XPathAdapter.java:83)<br>
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:107)<br>	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:63)<br>	... 62 more<br>--- Nested Exception ---<br>
java.lang.RuntimeException: Could not retrieve XPath &gt;.//input[@type=&#39;radio&#39; and @name=&#39;docProviderIds[&#39;adv&#39;]&#39; and @value=&#39;TPA&#39;]&lt; on HtmlForm[&lt;form method=&quot;post&quot;&gt;]<br>
	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:85)<br>	at com.gargoylesoftware.htmlunit.html.DomNode.getByXPath(DomNode.java:1328)<br>	at com.canoo.webtest.steps.form.SetRadioButton.findFields(SetRadioButton.java:38)<br>
	at com.canoo.webtest.steps.form.AbstractSetFieldStep.doExecute(AbstractSetFieldStep.java:144)<br>	at com.canoo.webtest.steps.Step.execute(Step.java:101)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)<br>	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)<br>
	at com.canoo.webtest.steps.Step.execute(Step.java:101)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)<br>
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>
	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:585)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)<br>	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>
	at org.apache.tools.ant.Main.runBuild(Main.java:698)<br>	at org.apache.tools.ant.Main.startAnt(Main.java:199)<br>	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)<br>	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)<br>
Caused by: javax.xml.transform.TransformerException: Expected ], but found: adv<br>	at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)<br>	at org.apache.xpath.compiler.XPathParser.consumeExpected(XPathParser.java:526)<br>
	at org.apache.xpath.compiler.XPathParser.Predicate(XPathParser.java:1935)<br>	at org.apache.xpath.compiler.XPathParser.Step(XPathParser.java:1724)<br>	at org.apache.xpath.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1633)<br>
	at org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1595)<br>	at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)<br>	at org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)<br>
	at org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)<br>	at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)<br>	at org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)<br>
	at org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)<br>	at org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)<br>	at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)<br>
	at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)<br>	at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)<br>	at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)<br>
	at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.&lt;init&gt;(XPathAdapter.java:83)<br>	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:107)<br>	at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:63)<br>
	... 62 more<br></pre>
<br>

<br><br><div class="gmail_quote">On Wed, Sep 24, 2008 at 1:17 AM, Marc Guillemot <span dir="ltr">&lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Lisa,<br>
<br>
can you provide the stacktrace of the exception you get?<br>
<br>
Cheers,<br>
Marc.<br>
--<br>
Web: <a href="http://www.efficient-webtesting.com" target="_blank">http://www.efficient-webtesting.com</a><br>
Blog: <a href="http://mguillem.wordpress.com" target="_blank">http://mguillem.wordpress.com</a><br>
<div><div></div><div class="Wj3C7c"><br>
Lisa Crispin wrote:<br>
&gt; Our app uses Spring velocity macros (I think that&#39;s the right<br>
&gt; terminology) to generate HTML. In one new page in the UI, it&#39;s<br>
&gt; generating ids and names that look like this:<br>
&gt;<br>
&gt; id=&quot;docProviderIds[&#39;aaa&#39;]&quot;<br>
&gt;<br>
&gt; My WebTest script gets a Java runtime exception. I presumed this is<br>
&gt; because of the single quotes within the double quotes, as my<br>
&gt; understanding is that this is invalid. However, when we run that page<br>
&gt; through the WC3 validator, it doesn&#39;t complain about the quotes, but<br>
&gt; about the bracket:<br>
&gt;<br>
&gt; /character &quot;[&quot; is not allowed in the value of attribute &quot;ID&quot;/<br>
&gt; We have lots of pages where the html ID and name have square brackets,<br>
&gt; but WebTest never had a problem with those<br>
&gt;<br>
&gt; Are we wrong about the single quote within the double quote? WebTest (or<br>
&gt; HtmlUnit) really unhappy with the brackets? But if that&#39;s the case, why<br>
&gt; doesn&#39;t it complain about them in many other pages for which we have<br>
&gt; scripts?<br>
&gt;<br>
&gt; Is there any way to tell WebTest or HtmlUnit to ignore certain things in<br>
&gt; the HTML, relax the validation, as it were (I don&#39;t think so, but I<br>
&gt; thought I&#39;d ask).<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Lisa<br>
&gt; //<br>
&gt;<br>
&gt; --<br>
&gt; Lisa Crispin<br>
&gt; Co-author with Janet Gregory, Agile Testing<br>
&gt; <a href="http://www.agiletester.ca" target="_blank">http://www.agiletester.ca</a><br>
&gt; <a href="http://lisa.crispin.home.att.net" target="_blank">http://lisa.crispin.home.att.net</a><br>
&gt; <a href="http://lisacrispin.blogspot.com" target="_blank">http://lisacrispin.blogspot.com</a><br>
<br>
</div></div>_______________________________________________<br>
WebTest mailing list<br>
<a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br>
<a href="http://lists.canoo.com/mailman/listinfo/webtest" target="_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
</blockquote></div><br><br clear="all"><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_72659_30711817.1222270323370--