Hi,

I guess that <ifStep> <then> statement didn't exist in WebTest 2.5.
Remember that the online documentation is always for the latest build.
You should upgrade to a recent version.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


Deepa Nigam wrote:
> 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!
> <http://www.gowindowslive.com/Mobile/Landing/Messenger/Default.aspx?Locale=en-US?ocid=TAG_APRIL>

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to