[Webtest] No dynamic property in storeRegEx

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


Hi,

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=
r
use the wt:matches function provided by WebTest (should work like
http://www.w3.org/TR/xquery-operators/#func-matches).
- 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.

Marc.


Marcel St=C3=B6r wrote:
>=20
> Hi,
>=20
>> Here are a few lines form a test I did today that seems to match the=20
>> logic you describe and works OK:
>>=20
>>         <repeat description =3D "for each line in AKL page" startCount=
=3D"1"=20
>> 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}" />
>>=20
>> The only problem I have is being crap at regex I don't like the way I=20
>> have to repeat the group.
>>=20
>> If that isn't what you are trying to do, perhaps you need to give the=20
>> exact problem...
>=20
> Well, the site I'm testing generates JavaScript menus. And since the app=
=20
> 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=
=20
> the DOM on mouseover. Hence, DOM-based operations are not applicable.
>=20
> So, I want to parse all the navigation links out of that crappy JS code=
=20
> (the number of links varies), invoke each link, and do a few general=20
> tests on each page navigated to.
>=20
> 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=
=20
> (i.e. parts of regex) in test script.
>=20
> Regards,
> Marcel
>=20
> --=20
> Marcel St=C3=B6r, http://www.frightanic.com
> Blog: http://frightanic.wordpress.com
> Skype: marcelstoer
>=20
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20
>=20

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