About the Data Selectors Panel
On the Data Selectors panel, you view and create data selectors – special rules for extracting data from server responses and saving this data to variables. You can then use the extracted values to parameterize subsequent requests or to check the response data.
LoadComplete uses the panel for these operations:
- Request (HTTP requests)
- WebSocket Connection (a request that establishes a WebSocket connection is a regular HTTP request that includes WebSocket-specific data.)
- WebSocket Server Message
Here are sample views of the panel:
HTTP Requests By default, the Data Selectors panel is on the Response page |
WebSocket Server Messages |
Child items of a selector correspond to requests or client messages that use the data extracted by the selector. You can also view these requests and client messages in the Provides Data For panel displayed by default side-by-side with the Data Selectors list (see the image above).
You can double-click a request or client message under the selector to open a data replacer that inserts the extracted data to the request or client message.
Using Data Selectors
Correlating Dynamic Parameters Manually
More information on creating data selectors:
Columns
Column | Description |
---|---|
Rule | How the data selector was created:
|
Area |
Specifies the part of the response, from which the selector will extract data:
Used for HTTP requests only. For WebSocket messages, this column is hidden. |
Expression | Specifies the search pattern the data selector will use to find data. You can enter the search pattern manually, or specify one or multiple variables that form the needed pattern. See below for details.HTTP RequestsThe value you specify in the Expression column depends on what you set in the Area column:
WebSocket MessagesSame as for the Body (RegExp) area of the HTTP request. That is, either a regular expression, or one or multiple variables. See above. Note on setting the cell valueYou can either enter the search expression in the cell, specify a single variable that contains the expression, or specify a combination of variables that form the needed expression. To specify a variable, use the following syntax: \vVariableName\v To concatenate variable values and data, use the data1\vVariable1\vdata2\vVariable2\vdata3 |
Attributes | This column is used if the Area column has the Body (RegExp) or Header (RegExp) value, that is, if you create a regular expression for response body or header (or for a WebSocket message). For Cookie, Body (Path), and Header (Path) areas, the Attributes column is ignored.
If you specify a regular expression in the Expression column, then the Attributes column specifies a subexpression (or group) that points to the smaller piece of extracted data to be saved to the variable. Subexpressions (groups) are part of the regular expression enclosed in parentheses, for example:
The Attributes value should specify the subexpression in the format |
Variable | The variable, to which LoadComplete will save the extracted value. You can specify any variable available in your project, that is, the variable can be defined in the scenario you are editing, or in any other scenario of your project, or in any wizard. If the specified variable does not exist, LoadComplete will create it. If you specify an existing variable, LoadComplete will overwrite its value. |
Convert | Specifies whether LoadComplete will encode or decode data after extracting them from the response. The variable, to which you save the extracted data, will store converted value. This is needed, for example, if you want to insert a variable to a header or cookie of the subsequent request, and this header’s or cookie’s value requires data in a different format than extracted data. A typical example is replacing URL-encoded characters (like %20, %2B, and others) and HTML entities (like &, <, >, and others) with their textual presentation, or vice versa. You choose the decoding or encoding format from the drop-down list. For more information on conversion, see Converting Correlation Data. |
Creating, Editing, and Deleting Data Selectors
Related Topics of Interest
See Also
Regular Expressions Syntax
Create Data Selector Wizard
Request Operation
WebSocket Connection Operation
WebSocket Server Message Operation
Data Replacers Panel
Scenario Editor - Common Tasks