[Webtest] No dynamic property in storeRegEx

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Wed, 23 May 2007 04:25:03 -0700 (PDT)


some (maybe crazy) ideas:
- perhaps can you combine XPath and RegEx. Sadly I haven't found time to
document it until now, but you can define your own custom XPath functions o=
use the wt:matches function provided by WebTest (should work like
- what kind of JS events activate the links? Perhaps it is possible to
simulate it.

otherwise as Denis said, a small Groovy script would surely work.


Marcel St=C3=B6r wrote:
> Hi,
>> Here are a few lines form a test I did today that seems to match the=20
>> logic you describe and works OK:
>>         <repeat description =3D "for each line in AKL page" startCount=
>> count=3D"5" countername=3D"line" >=20
>>             <storeRegEx text=3D"(\d+,)(\d+,)(\d+,)(\d+,)(\d+,)"=20
>> 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=20
>> have to repeat the group.
>> If that isn't what you are trying to do, perhaps you need to give the=20
>> exact problem...
> Well, the site I'm testing generates JavaScript menus. And since the app=
> runs on a IBM Portal Server all the URLs are dynamically generated. At=20
> startup all the menu items are loaded into a JS array and only added to=
> the DOM on mouseover. Hence, DOM-based operations are not applicable.
> So, I want to parse all the navigation links out of that crappy JS code=
> (the number of links varies), invoke each link, and do a few general=20
> tests on each page navigated to.
> Constraints: can't use XPath (see first paragraph), need to use regex,=20
> don't know the max. repeat count, don't want hard-code menu item labels=
> (i.e. parts of regex) in test script.
> Regards,
> Marcel
> --=20
> Marcel St=C3=B6r, 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

View this message in context: http://www.nabble.com/No-dynamic-property-in-=
Sent from the WebTest mailing list archive at Nabble.com.