2 formatting and re-tag
source | link

The response that I'm getting onin JMeter vs Browser's Network tab response doesn't match. there'sThere's a csrfCSRF token but it's not placed on a hidden input tag it's inside a jsJS var and is being returned when page is accessed. 

I'm using a Regular Expression ExtractorRegular Expression Extractor but I'm not sure if I'm gettingI get the correct csrfCSRF value

So the script looks like this:

<script type="text/javascript"> var csrf_token = "CSRFTokenHere"

<script type="text/javascript">
    var csrf_token = "CSRFTokenHere"

andAnd my Regular Expression Extractor looks like this:

window.csrf_token = '(.+?)';

window.csrf_token              = '(.+?)';

The response that I'm getting on JMeter vs Browser's Network tab response doesn't match. there's a csrf token but it's not placed on a hidden input tag it's inside a js var and is being returned when page is accessed. I'm using a Regular Expression Extractor but I'm not sure if I'm getting the correct csrf value

So the script looks like this:

<script type="text/javascript"> var csrf_token = "CSRFTokenHere"

and my Regular Expression Extractor looks like this:

window.csrf_token = '(.+?)';

The response that I'm getting in JMeter vs Browser's Network tab response doesn't match. There's a CSRF token but it's not placed on a hidden input tag it's inside a JS var and is being returned when page is accessed. 

I'm using a Regular Expression Extractor but I'm not sure if I get the correct CSRF value

So the script looks like this:

<script type="text/javascript">
    var csrf_token = "CSRFTokenHere"

And my Regular Expression Extractor looks like this:

window.csrf_token              = '(.+?)';
1
source | link

How do I get the CSRF Token inside JS variable in JMeter

The response that I'm getting on JMeter vs Browser's Network tab response doesn't match. there's a csrf token but it's not placed on a hidden input tag it's inside a js var and is being returned when page is accessed. I'm using a Regular Expression Extractor but I'm not sure if I'm getting the correct csrf value

So the script looks like this:

<script type="text/javascript"> var csrf_token = "CSRFTokenHere"

and my Regular Expression Extractor looks like this:

window.csrf_token = '(.+?)';