CSS Variable Extractor¶
CSS/JQuery Variable Extractors lets you extract variables from HTML responses using CSS/JQuery.
Extracting variables from HTTP response helps you make your Virtual User have a dynamic behavior. Extracted variables can be injected in Logic Actions or HTTP Request Actions.
The first line displays the extracted variable name. This field is mandatory if you want to inject what you extract. The second line contains tab headers to access:
- Configuration, for more specific needs,
- Check, to validate the result of your CSS/JQuery against an HTTP response.
The response selector, on the right, lets you choose which HTTP response is used for configuring and checking the CSS/JQuery Action. So if neither recorded responses nor Validate VU responses are available, you have to configure the CSS/JQuery Action blindly.
To configure a CSS/JQuery extractor, the procedure is as follows:
- Select the implementation between, JSoup or Jodd,
- Fill the CSS/JQuery expression field with a proper CSS/JQuery,
- Select the Match number if your expression yields more than one result.
To check the result of a CSS/JQuery action just click on the Check tab.
The check process is automatically launched when this tab is opened. It can also be manually started using the Refresh button.
A table contains the extracted values :
|Extracted variable name||The name of the extracted variable. A single CSS/JQuery Action can lead to multiple extracted variables. More information below.|
|Extracted variable value||The value of the extracted variable.|
Multiple variables can be generated by a single CSS/JQuery Action.