[Webtest] <repeat>

Hesteric Roman webtest@lists.canoo.com
Fri, 19 Sep 2003 10:33:03 +0200


Hi!

	What's wrong in my code, please ?


Roman.


Example:

	<repeat count="2" countername="NR">
	.
      .
      .
      <storexpath     stepid="Increment" xpath="#{NR}+1" property="Num" />
     	<setinputfield  stepid="Fill Name" name="NAME" value="#{Num}"/>
       
      .
      . 
      </repeat>


result:

Error
Exception
org.dom4j.InvalidXPathException
Exception
Invalid XPath expression: #{NR}+1 Unexpected '#{NR}+1'
Stacktrace
org.dom4j.InvalidXPathException: Invalid XPath expression: #{NR}+1
Unexpected '#{NR}+1'
	at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:316)
	at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:63)
	at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:182)
	at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
	at
org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:187)
	at com.canoo.webtest.steps.StoreXPath.doExecute(StoreXPath.java:66)
	at com.canoo.webtest.steps.Step.execute(Step.java:56)
	at
com.canoo.webtest.steps.RepeatWrapper.executeContainedSteps(RepeatWrapper.ja
va:113)
	at
com.canoo.webtest.steps.RepeatWrapper.doExecute(RepeatWrapper.java:92)
	at com.canoo.webtest.steps.Step.execute(Step.java:56)
	at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
	at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
va:55)
	at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
	at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
	at org.apache.tools.ant.Main.runBuild(Main.java:610)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)