[Webtest] Can't access "step" variable inside Groovy step
Curelea, Alexandru
webtest@lists.canoo.com
Wed, 5 Jul 2006 17:05:00 -0400
Whoops. I found my problem - and of course it's obvious in hindsight. =
I had a groovy taskdef of the "regular" Groovy step in my modified build =
file. I guess this replaced WebTest's taskdef with the extensions to =
the groovy step, so obviously the "step" variable wasn't available.
And you're right about dynamicProperties - I got that from the wiki, at =
http://webtest-community.canoo.com/wiki/space/Groovy/GroovyStep... I =
should've noticed the "Last edited by Mittie, one year and 243 days ago" =
;)
Thanks for the help!
Alex
-----Original Message-----
From: webtest-admin@gate2.canoo.com
[mailto:webtest-admin@gate2.canoo.com]On Behalf Of Dierk Koenig
Sent: Wednesday, July 05, 2006 4:31 PM
To: webtest@gate2.canoo.com
Subject: RE: [Webtest] Can't access "step" variable inside Groovy step
hm, surprising.
Your example seems to be a little outdated. What WebTest version and
documentation are you referring to?
I'm concerned with 'dynamicProperties', which should meanwhile read
'webtestProperties', see
http://webtest.canoo.com/webtest/manual/groovy.html
For the running examples of the selftest see
http://webtest.canoo.com/fisheye/viewrep/CanooWebTest/selftests/tests/gro=
ovy
.xml?r=3D10563
what happens if you do
println step
?
cheers
Mittie
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Curelea, Alexandru
> Sent: Mittwoch, 5. Juli 2006 18:08
> To: webtest@gate2.canoo.com
> Subject: [Webtest] Can't access "step" variable inside Groovy step
>
>
> Hi all,
>
> I can't seem to access the step convenience variable inside a
> <groovy> step. A very simple example:
>
> <storeRegEx description=3D"Get Marked ID" text=3D"markedId=3D([0-9]*)"
> property=3D"markedTimeId" propertyType=3D"dynamic" group=3D"1"/>
> <groovy>
> String markedId =3D step.dynamicProperties.markedTimeId
> </groovy>
>
> This fails with:
>
> Exception
> com.canoo.webtest.engine.StepExecutionException
> Message
> Unexpected exception caught:
> C:\Work\tsm\canoo\webtests\modules\markedtime\deleteAllMarkedTimes
> .xml:12: groovy.lang.MissingPropertyException: No such property:
> step for class: Script1
>
> The way I'm trying to use it seems consistent with the examples
> in the WebTest documentation... am I missing something really
> simple? (I hope so!)
>
> Thanks for any help,
>
> Alex
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest