Siva
Siva

Reputation: 35

How to extract viewstate and eventvalidation using regular expression parsing partial renders with JMeter ASP.net

In my case, I am able to extract viewstate and eventvalidation from response, when the response is like:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="UGflz/O67VPwTmNdi......"

by giving expression as:

name="__VIEWSTATE" id="__VIEWSTATE" value="(.+?)"

but what is the expression i need to use, when the response is like:

 |hiddenfield|__viewstate|koflrijcjafaygr......|

How can I extract this type of response.

Upvotes: 0

Views: 1191

Answers (2)

sivanan
sivanan

Reputation: 11

I have applied below and make it work

expression: VIEWSTATE|(.+?)|

Template:$1$

Match No: 1enter image description here

Upvotes: 0

Rohit
Rohit

Reputation: 611

use "\" to escape | as

for example to extract viewstate value from

|hiddenfield|__viewstate|koflrijcjafaygr......|

You can use this regular expression __viewstate\|(.+?)\|

You can follow this blogs for such information

Upvotes: 2

Related Questions