Inserting Variables Into Web Forms

Applies to LoadComplete 4.97, last modified on May 20, 2019

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.

  1. Open the scenario in the Scenario editor. To do this, double-click the scenario in the Project Explorer.

  2. In the Scenario Explorer, find the POST request that submits a web form.

  3. 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.

  4. In the Field column, select the form field whose value you want to replace with a variable.

  5. 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.

    Using Variable to Specify Web Form Fields

    Click the image to enlarge it.

    LoadComplete automatically URL-encodes variable values when simulating requests (for example, replaces the spaces and commas with %20 and %2B).

  6. 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

Highlight search results