[Webtest] No dynamic property in storeRegEx

John and Pip John and Pip" <pipandjohn@gmail.com
Wed, 23 May 2007 20:49:44 +1200


------=_Part_34971_7746264.1179910184704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Marcel,

Here are a few lines form a test I did today that seems to match the logic
you describe and works OK:

        <repeat description =3D "for each line in AKL page" startCount=3D"1=
"
count=3D"5" countername=3D"line" >
            <storeRegEx text=3D"(\d+,)(\d+,)(\d+,)(\d+,)(\d+,)"
group=3D"#{line}" property=3D"Price" propertyType=3D"dynamic"/>
            <echo message=3D"price using RegEx of #{Price}" />

The only problem I have is being crap at regex I don't like the way I have
to repeat the group.

If that isn't what you are trying to do, perhaps you need to give the exact
problem...

cheers,
       John

On 5/23/07, Marcel St=F6r <marcel@frightanic.com> wrote:
>
> Denis N. Antonioli wrote:
> > Hi
> >
> > On 21 mai 07, at 09:49, Marcel St=F6r wrote:
> >
> >> If I remove propertyType=3D"ant" or use propertyType=3D"dynamic", <ech=
o
> >> message=3D"${myMenuItemUrl}" /> will print ${myMenuItemUrl} instead of
> >> the real value. Why is that?
> >
> > See <http://webtest.canoo.com/webtest/manual/properties.html>
> > You need a hash '#' to access a dynamic property, like:
> > <echo message=3D"#{myMenuItemUrl}" />
> >
> >> This wouldn't be such a big deal if I only had this one menu item to
> >> check, but - and this is my second question - I want to repeat the
> >> above for each menu item. Of course, in a somewhat dynamic maner...
> >> I'd like to define a collection of myMenuItemText (is part of my regex
> >> above) values and have the above repeated. How to go about that?
>
> Did I maybe puzzle everybody with my question? Looks I failed to explain
> it in a comprehensible way. 2nd try:
> I guess what I'm looking for is something like <repeat
> regex=3D"myExpressionWithManyMatches"... Since that doesn't exist I'm
> looking to achieve that with other tasks/steps, but I'm out of ideas.
>
> Regards,
> Marcel
>
> --
> Marcel St=F6r, http://www.frightanic.com
> Blog: http://frightanic.wordpress.com
> Skype: marcelstoer
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_34971_7746264.1179910184704
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi Marcel,<br><br>Here are a few lines form a test I did today that seems t=
o match the logic you describe and works OK:<br><br>&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &lt;repeat description =3D &quot;for each line in AKL page&q=
uot; startCount=3D&quot;1&quot; count=3D&quot;5&quot; countername=3D&quot;l=
ine&quot; &gt;&nbsp;=20
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;storeRegEx=
 text=3D&quot;(\d+,)(\d+,)(\d+,)(\d+,)(\d+,)&quot; group=3D&quot;#{line}&qu=
ot; property=3D&quot;Price&quot; propertyType=3D&quot;dynamic&quot;/&gt; <b=
r>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;echo message=
=3D&quot;price using RegEx of #{Price}&quot; /&gt;
<br><br>The only problem I have is being crap at regex I don&#39;t like the=
 way I have to repeat the group.<br><br>If that isn&#39;t what you are tryi=
ng to do, perhaps you need to give the exact problem...<br><br>cheers,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; John<br><br><div><span class=3D"gmail_=
quote">On 5/23/07, <b class=3D"gmail_sendername">Marcel St=F6r</b> &lt;<a h=
ref=3D"mailto:marcel@frightanic.com">marcel@frightanic.com</a>&gt; wrote:</=
span><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(=
204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Denis N. Antonioli wrote:<br>&gt; Hi<br>&gt;<br>&gt; On 21 mai 07, at 09:49=
, Marcel St=F6r wrote:<br>&gt;<br>&gt;&gt; If I remove propertyType=3D&quot=
;ant&quot; or use propertyType=3D&quot;dynamic&quot;, &lt;echo<br>&gt;&gt; =
message=3D&quot;${myMenuItemUrl}&quot; /&gt; will print ${myMenuItemUrl} in=
stead of
<br>&gt;&gt; the real value. Why is that?<br>&gt;<br>&gt; See &lt;<a href=
=3D"http://webtest.canoo.com/webtest/manual/properties.html">http://webtest=
.canoo.com/webtest/manual/properties.html</a>&gt;<br>&gt; You need a hash &=
#39;#&#39; to access a dynamic property, like:
<br>&gt; &lt;echo message=3D&quot;#{myMenuItemUrl}&quot; /&gt;<br>&gt;<br>&=
gt;&gt; This wouldn&#39;t be such a big deal if I only had this one menu it=
em to<br>&gt;&gt; check, but - and this is my second question - I want to r=
epeat the
<br>&gt;&gt; above for each menu item. Of course, in a somewhat dynamic man=
er...<br>&gt;&gt; I&#39;d like to define a collection of myMenuItemText (is=
 part of my regex<br>&gt;&gt; above) values and have the above repeated. Ho=
w to go about that?
<br><br>Did I maybe puzzle everybody with my question? Looks I failed to ex=
plain<br>it in a comprehensible way. 2nd try:<br>I guess what I&#39;m looki=
ng for is something like &lt;repeat<br>regex=3D&quot;myExpressionWithManyMa=
tches&quot;... Since that doesn&#39;t exist I&#39;m
<br>looking to achieve that with other tasks/steps, but I&#39;m out of idea=
s.<br><br>Regards,<br>Marcel<br><br>--<br>Marcel St=F6r, <a href=3D"http://=
www.frightanic.com">http://www.frightanic.com</a><br>Blog: <a href=3D"http:=
//frightanic.wordpress.com">
http://frightanic.wordpress.com</a><br>Skype: marcelstoer<br><br><br>______=
_________________________________________<br>WebTest mailing list<br><a hre=
f=3D"mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href=
=3D"http://lists.canoo.com/mailman/listinfo/webtest">
http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><=
br>

------=_Part_34971_7746264.1179910184704--