[Webtest] Error with verifyProperty nested (fixed)
Jérome Macias
webtest@lists.canoo.com
Wed, 26 Jan 2005 14:48:24 +0100
I've resolved the problem.
VerifyProperty is defining 2 times in the webtestTaskdefs.properties file, first with com.canoo.webtest.steps.verify.VerifyProperty and second with com.canoo.webtest.extension.VerifyProperty that is not good with the last build (I use R_659).
Many thanks,
Jérôme.
-----Original Message-----
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com] On Behalf Of Paul King
Sent: mercredi 26 janvier 2005 13:24
To: webtest@gate2.canoo.com
Subject: Re: [Webtest] Error with verifyProperty nested
Hi Jérome,
The good news is that your test script looks fine.
You seem to have a slightly old version of the VerifyProperty
step and a more recent version of some of the other webtest classes.
Provided you are using a recent version of webtest, then you should
use the built in version of that step at:
com.canoo.webtest.steps.verify.VerifyProperty
The original custom step at:
com.canoo.webtest.extension.VerifyProperty
should only be used if the built-in one doesn't exist in the
webtest.jar file that you are using (prior to build 591).
Hopefully, a single line change in your webtestTaskdefs.properties
file should set you straight. If you are using an oldish property file
you might want to compare for other recent changes as well (have a
look at the version of that files which comes with the distribution).
Cheers, Paul.
Jérome Macias wrote:
> I've realized a test to control JavaScript error on submit form.
>
>
>
> _My testcase code is:_
>
> <new_selectform name="consumerDetails"/>
>
> <clickbutton stepid="Submit form 1" name="submit"/>
>
> <prepareDialogResponse saveProperty="error_alert1"
> savePropertyType="dynamic" dialogType="alert" response="true" />
>
> <verifyProperty property="error_alert1" stepid="Verify dynamic =
property
> error_alert1 contains 'Please do not leave this field blank'"
> text="Please do not leave this field blank" />
>
>
>
>
>
> _I've the error:_
>
> =
E:\p4\depot\apps\swf\eshop\smoketests\testcases\CompleteCheckoutTestSecurity.xml:13:
> Test failed.
>
> Exception raised: com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught: java.lang.NoSuchMethodError:
> =
com.canoo.webtest.extension.VerifyProperty.getDynamicProperties()Ljava/util/Map;,
> Step: VerifyProperty at
> =
E:\p4\depot\apps\swf\eshop\smoketests\testcases\CompleteCheckoutTestSecurity.xml:27:
> with (text="Please do not leave this field blank",
> property="error_alert1", stepId="Verify dynamic property =
error_alert1
> contains 'Please do not leave this field blank'", regex="false",
> =
stepType="verifyProperty")com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught: java.lang.NoSuchMethodError:
> =
com.canoo.webtest.extension.VerifyProperty.getDynamicProperties()Ljava/util/Map;,
> Step: VerifyProperty at
> =
E:\p4\depot\apps\swf\eshop\smoketests\testcases\CompleteCheckoutTestSecurity.xml:27:
> with (text="Please do not leave this field blank",
> property="error_alert1", stepId="Verify dynamic property =
error_alert1
> contains 'Please do not leave this field blank'", regex="false",
> stepType="verifyProperty")
>
> at
> com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:475)
>
> at com.canoo.webtest.steps.Step.execute(Step.java:151)
>
> at =
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:31)
>
> at
> =
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTaskjava:70)
>
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>
> at org.apache.tools.ant.Task.perform(Task.java:364)
>
> at org.apache.tools.ant.Target.execute(Target.java:341)
>
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>
> at =
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
>
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>
> at org.apache.tools.ant.Task.perform(Task.java:364)
>
> at org.apache.tools.ant.Target.execute(Target.java:341)
>
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
>
> at =
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>
> at =
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>
> at org.apache.tools.ant.Main.runBuild(Main.java:673)
>
> at org.apache.tools.ant.Main.startAnt(Main.java:188)
>
> at org.apache.tools.ant.Main.start(Main.java:151)
>
> at org.apache.tools.ant.Main.main(Main.java:241)
>
>
>
> Thx, Jérôme.
>
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest