Forum Discussion
Hi Katarzyna,
You need to use auto-updated parameters for that (see the Auto-Updating Page Parameters help topic for more information).
For example, here are the auto-updated parameters for common ASP.NET variables:
Name: __VIEWSTATE
Regular Expression: \sname\s*?\=\s*?"__VIEWSTATE"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>
Replacing Mask: $1
Name: __EVENTVALIDATION
Regular Expression: \sname\s*?\=\s*?"__EVENTVALIDATION"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>
Replacing Mask: $1
Here, the Name field refers to an URL or body variable name (that is, a parameter of a GET or a POST request). The regular expression is applied to the body of responses sent by your web server (that is, to the HTML markup returned by the server in general case). Since __VIEWSTATE value is written in a hidden input tag, the particular regular expression retrieves a tag which has "name" attribute equal to "__VIEWSTATE" and gets the value of the "value" attribute from the same tag - that is, retrieves the viewstate value. The Replacing Mask field specifies the new value of the __VIEWSTATE URL or Body parameter which should be inserted instead of the recorded value. The value can be either a hard-coded string or (which is more common case) a string retrieved from an actual server response via a regular expression (as in the sample above). The "$1" string means that the recorded value should be replaced with the value retrieved from a first regular expression match group (note the parentheses in the regular expression above - the value in parentheses is the value which will be retrieved from the actual HTML and inserted in HTTP requests).
Related Content
Recent Discussions
- 2 days agoMW_Didata