You can replace recorded web form values in POST requests with variables that contain data extracted from preceding responses or data that LoadComplete generates or gets from external files. This way, for example, you can handle dynamically generated hidden field values in the ASP.NET application.
-
Open the scenario in the Scenario editor. To do this, double-click the scenario in the Project Explorer.
-
In the Scenario Explorer, find the POST request that submits a web form.
-
Switch to the Request page of the request editor and go to the Request Body tab at the bottom of the page. Here you can see form field names and values.
-
In the Field column, select the form field whose value you want to replace with a variable.
-
In the Value column, enter the name of the needed variable, in the
@VariableName
format, or click and select the variable in the resulting dialog.LoadComplete automatically URL-encodes variable values when simulating requests (for example, replaces the spaces and commas with
%20
and%2B
). -
Select File > Save from the main menu to save the changes you have made.
See Also
Data Correlation
Parameterizing Requests
Using Variables
Extracting Data From Responses
Specifying Appropriate Request Data