[Webtest] storeregex - how does the store part work?

Bill Milbratz webtest@lists.canoo.com
Wed, 28 Apr 2004 20:20:46 -0500

You need to use the group part. here's an example that works:

       stepid="Store Title of public facing pagePage"
      property="previous.title" />
<verifytitle stepid="Verify previous title"
    regex="false" />

-----Original Message-----
From: lisa.crispin@att.net [mailto:lisa.crispin@att.net]
Sent: Wednesday, April 28, 2004 7:53 PM
To: webtest@lists.canoo.com
Subject: [Webtest] storeregex - how does the store part work?

I need to extract a userid out of my html so I can then click on the right
link for the user I want (I don't know the userid in advance, only the
username).  I got the regex to work ok, at least it says it passes, but it
stores the whole HTML page, not just the part I want.  What did I do wrong?
I'm sure something really dumb.  I'm trying to store 5 digits that come
after 'userId='.  I'm not very good with regex or with WebTest, it's a
deadly combo.

	<storeregex stepid="get userid of user to delete"

	<clicklink stepid="go to delete for that user" 
		label="deleteAccount&amp;userid=#{deleteUserid}" />

Another question is, could I use a property for the value of the username in
the storegex text itself?  Instead of hardcoding 'TestCSRApr28b' can I use
something like ${username}?
Thank you,
WebTest mailing list