1

I need to login a webpage. Passing the parameters from navigation screen,to POST to login screen i used CSS/Jquery extractor. of the three values extracted, Viewstate generator value is passed correctly. But Eventvalidation and Viewstate has completely different values when passed.

Values i get from Navigating to the website:

`VIEWSTATEGENERATORExtractor=C2EE9ACC,VIEWSTATEExtractor=r6PHK0,
EVENTVALIDATIONExtractor=xLhYcNpU3vb8+Om5`      
And passed as VIEWSTATEGENERATOR =C2EE9ACC
EVENTVALIDATION value=Blncm,VIEWSTATE" value=iFpefxx7

Some values are generated when passed through but not from previous browser navigation.

DO not understand how 1 value can be passed correctly and not other two. I use same format for all the three

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
Vicky
  • 39
  • 1
  • 6
  • share the full response and regex expression. There is a chance that there are more than 1 viewstate – vins Jan 26 '17 at 18:32
  • I used CSS/Jquery Extractor with Jsoup:Jquery expression as input[id=__viewstate],Attribute as Value;Match No:1 . When passed as parameter the result i get is – Vicky Jan 26 '17 at 18:50
  • I am struck because some random values are passed between the requests though i use {eventvalidation} reference. It does not pass incorrect values but some random values between the requests and – Vicky Jan 26 '17 at 21:06

1 Answers1

0

This is the whole point of viewstate and eventvalidation parameters, they are different each time, that's why you need to correlate them for each request.VIEWSTATE has all the information about client-side page state, basically what did the user do on each step. EVENTVALIDATION is a form of CSRF protection, so it has to be different each time as well.

You can validate that your script is doing what it is supposed to be doing using View Results Tree listener.

References:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks so much Dmitri. But one more clarification So why do we have to pass the Event validation and viewstate as parameters from one step to another? http://stackoverflow.com/questions/33030823/could-not-handle-view-state-and-event-validation-in-jmeter-load-testing – Vicky Jan 27 '17 at 14:52