[Webtest] newbie needs help - nesting properties
Marc Guillemot
webtest@lists.canoo.com
Fri, 10 Oct 2003 08:43:49 +0200
Hi Michael,
afaik the ${...} variables are expanded by ant and the #{...} by webtest.
I guess that in your case ant doesn't expand the variable because it's not valid
for him (probably because it contains a "{"). No idea of an other way to process.
Marc.
Michael Knapp wrote:
> Hi all - i'm new to both webtest and ant (as well as the dependency tools
> and packages), so please bear with me.
>
> I'm trying to use a <repeat> loop and refer to #(count) as part of a
> property name, like so
>
>
>
> ...
> <!-- these would actually be in a .props file, but the effect should be the
> same -->
> <property name="smoke.url.0" value="/pregnancy/"/>
> <property name="smoke.title.0" value="Pregnancy"/>
> <property name="smoke.url.1" value="/baby"/>
> <property name="smoke.title.1" value="Baby"/>
>
> ...
>
> <repeat count="2">
> <invoke stepid="Get page: ${smoke.title.#{count}}"
> url="${smoke.url.#{count}}"/>
> <verifytitle stepid="verify title"
> text="${smoke.title.#{count}}" />
> </repeat>
> ...
>
>
> It doesn't expand both variables, just the nested one (ie, on hte first
> iteration, it expands #{count} to "0",
> but doesn't expand the resultant ${smoke.title.0} to "Pregnancy".
>
> Does anyone have a better idea of how i should go about acheiving the same
> result? i'm really trying to code OAOO....
>
> Thanks
> mike
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>