Accessing the ADR with Inline Scripts

Inline Scripts are how you access the Apica Data Repository

Step

Screenshot

Step

Screenshot

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

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

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

Enter your Inline Script Code.

  • Test it

  • Save it as a Template

  • Load a previous Template

  • Add it to the Session when satisfied.

 

EXAMPLE:

This is an example of how an inline script can access ADR to fetch values for script execution. For a script, two inline scripts were written to access the 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 ADR values from a session.

We see that this Inline Script called ‘setTableRowVar” that was set to execute after URL #49 inputs the 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”

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’

 

 

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

 

 

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')

 

Can't find what you're looking for? Send an E-mail to support@apica.io