Hi Marc. This problem was solved by upgrading to the latest version of webtest.
Thanks Ian On Fri, Nov 14, 2008 at 9:26 AM, Marc Guillemot <[EMAIL PROTECTED]> wrote: > Ian, > > this looks like a bug. Can you open an issue an attach the html page on > which you're evaluating the XPath. > > Cheers, > Marc. > -- > Web: http://www.efficient-webtesting.com > Blog: http://mguillem.wordpress.com > > Ian Phillips wrote: > > Resent with less content. > > > > > > On Thu, Nov 13, 2008 at 4:44 PM, Ian Phillips <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > Hi. > > > > I am trying to get an xpath working. The xpath works in the WebTest > > Recorder Sidebar but fails when I try to use it: > > > > > > This is the line of code I am excuting and is failing: > > > > <verifyXPath description="more complicated match" > > xpath="/html/body/table/tbody/tr[2]/td/div[3]/div/form/span/input"/> > > > > <clickElement Description="Click the Shop now button" > > xpath="//div[3]/div/form/span/input"/> > > > > > > > > [invoke] INFO (com.canoo.webtest.engine.WebClientContext) - > > Current form set to none > > [invoke] INFO (com.canoo.webtest.engine.WebClientContext) - > > Current response now: http://localhost:8088/myshapeb2c/jfn > > [verifyText] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: > > verifyText "check that this is the right page" (3/173) > > [verifyXPath] INFO (com.canoo.webtest.steps.Step) - >>>> Start > > Step: verifyXPath "more complicated match" (4/173) > > [verifyXPath] INFO (com.canoo.webtest.engine.xpath.XPathHelper) - > > XPath error > > [verifyXPath] > > [verifyXPath] javax.xml.transform.TransformerException: Unknown > > error in XPath. > > [verifyXPath] at org.apache.xpath.XPath.execute(XPath.java:363) > > [verifyXPath] at > > com.canoo.webtest.engine.xpath.XPathHelper.eval(XPathHelper.java:384) > > [verifyXPath] at > > > com.canoo.webtest.engine.xpath.XPathHelper.getByXPath(XPathHelper.java:286) > > [verifyXPath] at > > > com.canoo.webtest.engine.xpath.XPathHelper.selectFirst(XPathHelper.java:278) > > [verifyXPath] at > > > com.canoo.webtest.steps.verify.VerifyXPath.verifyXPath(VerifyXPath.java:86) > > [verifyXPath] at > > > com.canoo.webtest.steps.verify.VerifyXPath.doExecute(VerifyXPath.java:67) > > [verifyXPath] at > com.canoo.webtest.steps.Step.execute(Step.java:101) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > > > com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43) > > [verifyXPath] at > > > com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31) > > [verifyXPath] at > com.canoo.webtest.steps.Step.execute(Step.java:101) > > [verifyXPath] at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > [verifyXPath] at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > > com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > org.apache.tools.ant.Target.execute(Target.java:357) > > [verifyXPath] at > > org.apache.tools.ant.Target.performTasks(Target.java:385) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > [verifyXPath] at > > > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > [verifyXPath] at > > org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > org.apache.tools.ant.Target.execute(Target.java:357) > > [verifyXPath] at > > org.apache.tools.ant.Target.performTasks(Target.java:385) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > [verifyXPath] at > > > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > [verifyXPath] at > > org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > org.apache.tools.ant.Target.execute(Target.java:357) > > [verifyXPath] at > > org.apache.tools.ant.Target.performTasks(Target.java:385) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > [verifyXPath] at > > > org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > [verifyXPath] at > > org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > org.apache.tools.ant.Target.execute(Target.java:357) > > [verifyXPath] at > > org.apache.tools.ant.Target.performTasks(Target.java:385) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeTarget(Project.java:1298) > > [verifyXPath] at > > > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > > [verifyXPath] at > > org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > [verifyXPath] at org.apache.tools.ant.Main.runBuild(Main.java:698) > > [verifyXPath] at org.apache.tools.ant.Main.startAnt(Main.java:199) > > [verifyXPath] at > > org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > > [verifyXPath] at > > org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > > [verifyXPath] Caused by: java.lang.NullPointerException > > [verifyXPath] at > > org.apache.xpath.axes.AxesWalker.setRoot(AxesWalker.java:219) > > [verifyXPath] at > > > org.apache.xpath.axes.WalkingIterator.setRoot(WalkingIterator.java:154) > > [verifyXPath] at > > org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:213) > > [verifyXPath] at > > > org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:210) > > [verifyXPath] at org.apache.xpath.XPath.execute(XPath.java:335) > > [verifyXPath] ... 74 more > > [verifyXPath] --------- > > [verifyXPath] java.lang.NullPointerException > > [verifyXPath] at > > org.apache.xpath.axes.AxesWalker.setRoot(AxesWalker.java:219) > > [verifyXPath] at > > > org.apache.xpath.axes.WalkingIterator.setRoot(WalkingIterator.java:154) > > [verifyXPath] at > > org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:213) > > [verifyXPath] at > > > org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:210) > > [verifyXPath] at org.apache.xpath.XPath.execute(XPath.java:335) > > [verifyXPath] at > > com.canoo.webtest.engine.xpath.XPathHelper.eval(XPathHelper.java:384) > > [verifyXPath] at > > > com.canoo.webtest.engine.xpath.XPathHelper.getByXPath(XPathHelper.java:286) > > [verifyXPath] at > > > com.canoo.webtest.engine.xpath.XPathHelper.selectFirst(XPathHelper.java:278) > > [verifyXPath] at > > > com.canoo.webtest.steps.verify.VerifyXPath.verifyXPath(VerifyXPath.java:86) > > [verifyXPath] at > > > com.canoo.webtest.steps.verify.VerifyXPath.doExecute(VerifyXPath.java:67) > > [verifyXPath] at > com.canoo.webtest.steps.Step.execute(Step.java:101) > > [verifyXPath] at > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > [verifyXPath] at > > sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > [verifyXPath] at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > [verifyXPath] at java.lang.reflect.Method.invoke(Method.java:585) > > [verifyXPath] at > > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > [verifyXPath] at org.apache.tools.ant.Task.perform(Task.java:348) > > [verifyXPath] at > > > com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43) > > [verifyXPath] at > > > com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31) > > [verifyXPath] at > com.canoo.webtest.steps.Step.execute(Step.java:101) > > [verifyXPath] at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > Ian > > > > > > > _______________________________________________ > WebTest mailing list > WebTest@lists.canoo.com > http://lists.canoo.com/mailman/listinfo/webtest >