Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Inline Scripts are how you access the Apica Data Repository

Step

Screenshot

Open a session (*.prxdat) via the Project Navigator.

Image Modified

Refresh the Main Menu to get to the Recorded session and click on any URL that you want values from the

ATS

ADR to populate.

Image Modified

On the Var Handler Column, find the Inline Scripts Row and click on “Add Inline Script” to open the Add Inline Script Dialog

Image Modified

Enter your Inline Script Code.

  • Test it

  • Save it as a Template

  • Load a previous Template

  • Add it to the Session when satisfied.

Image Modified

EXAMPLE:

This is an example of how an inline script can access

ATS

ADR to fetch values for script execution. For a script, two inline scripts were written to access the

ATS

ADR. We'll show a test of the second script.

Step

Screenshot

View an Inline Script

We opened up the link after URL #49 that we need a few

ATS

ADR values from a session.

Image Modified

We see that this Inline Script called ‘setTableRowVar” that was set to execute after URL #49 inputs the

ATS

ADR value of the country to the Var 1, 'team’

countries = team+";Moscow"
setTableRow("100_Sales_Reco

rds", "Country;Region", countries, "ROW")

We can Test or modify this script by clicking “Modify Inline Script”

Image Modified

Test Script with the “Test Script” button

This allows you to test the execution of the inline script. The run time environment like URL Data, Cookies, and the Value of the Input Variables is simulated (initialized) based on the data of the recorded session.

We see that this ‘setTableRowVar’ script is for the Input Var, ‘team’

Image Modified

Set the Test Script parameters

Note we can see where this script executes in the session

If needed, set the user/loop number and of the URL Call is Passed/Failed.

Click the “Execute Script” and wait for the server at 127.0.0.1 returns a result

Image Modified

The Script result will be displayed as well as the Input Var Name value (in this case the countries from the input team and 'Moscow')

Image Modified