According to manual (see
http://webtest.canoo.com/webtest/manual/ifStep.html) :
else
Required? no
Group of steps which execute if the 'ifStep' condition fails. If
neither 'then' or 'else' are explicitly set, any inner steps are
treated as if they were in an implicit 'then' step.
Could you try removing <then> </then> or adding <else></else> ?
dav.
--
Le lundi 28 avril 2008 à 15:09 -0700, Deepa Nigam a écrit :
> Hi,
>
> I am getting error when using <then> statement which is nested inside
> repeat. I have followed one of the <ifStep> example from webtest
> website. Can someone please tell me why I am getting this error:
>
> BUILD FAILED
> E:\ViewReport.xml:3: Canoo Webtest: R_1551.
> Test failed.
> Exception raised: E:\ViewReport.xml:77: Could no
> t create task or type of type: then.
>
> at
> org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownEleme
> nt.java:493)
> at
> org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:39
> 1)
> at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.jav
> a:158)
> at org.apache.tools.ant.Task.perform(Task.java:363)
> at
> com.canoo.webtest.steps.AbstractStepContainer.executeContainedStep(Ab
> stractStepContainer.java:74)
> at
> com.canoo.webtest.steps.AbstractStepContainer.executeContainedSteps(A
> bstractStepContainer.java:91)
> at
> com.canoo.webtest.steps.control.IfStep.doExecute(IfStep.java:101)
> at com.canoo.webtest.steps.Step.execute(Step.java:104)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at
> com.canoo.webtest.steps.AbstractStepContainer.executeContainedStep(Ab
> stractStepContainer.java:74)
> at
> com.canoo.webtest.steps.AbstractStepContainer.executeContainedSteps(A
> bstractStepContainer.java:91)
> at
> com.canoo.webtest.steps.control.GroupStep.doExecute(GroupStep.java:14
> )
>
> <repeat xpath="//[EMAIL PROTECTED]'infotable']//[EMAIL PROTECTED]'odd' or
> @class='even']" counterName="rowCount"
> description="iterate on all rows of the table">
> <echo message="#{myNumber}"/>
> <ifStep description="Value Matched">
> <condition>
> <verifyXPath
> description="value Matched or not"
> xpath="($rowCount/td[1]) = #{myNumber}"/>
> </condition>
> <then>
> <clickLink
> xpath="$rowCount/td[7]//a"
> save="${outputFile}"/>
> </then>
> </ifStep>
> </repeat>
>
>
> ______________________________________________________________________
> Express yourself wherever you are. Mobilize!
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest