[Webtest] No dynamic property in storeRegEx

Marcel Stör marcel@frightanic.com
Mon, 21 May 2007 09:49:33 +0200

Hi all,

I'm testing a web app that's based on a framework that generates 
terribly ugly JavaScript code for overlay navigation. So, I need to use 
regex to parse the link of a particular menu item.

My storeRegEx, however, only stores the evaluated regex if I use an Ant 
property. So, my test looks like this:
	<storeRegEx text="myMenuItemText.*LinkURL:&quot;(.*)&quot;,StoreURL:" 
propertyType="ant" group="1" property="myMenuItemUrl"/>
	<echo message="${myMenuItemUrl}" />
	<invoke url="${myMenuItemUrl}"/>
	<verifyText text="myMenuItemText"/>

If I remove propertyType="ant" or use propertyType="dynamic", <echo 
message="${myMenuItemUrl}" /> will print ${myMenuItemUrl} instead of the 
real value. Why is that?

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?

Thanks for your kind help.


Marcel Stör, http://www.frightanic.com
Blog: http://frightanic.wordpress.com
Skype: marcelstoer