'How I can get attribute from request Jmeter

I need to get a csrfToken from the session that is in the request attributes, and put in POST request, how I can do it?enter image description here



Solution 1:[1]

As per Spring documentation you will find the token in the response in form of HTML hidden input looking like:

<input type="hidden" name="${A}" value="${_csrf.token}"/>

so you will be able to use CSS Selector Extractor to get the token value and store it into a JMeter Variable so you will be able to re-use it later on where required.

More information: How to Load Test CSRF-Protected Web Sites

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T