Categories

Special values

When you can enter text in an Agilitest action, it is possible to click on a button that will allow you to insert special values.

button to open special values

This will show you all the special values organized in a dedicated menu.

Special value menu

Among these special values are:

Environment variable

environment variable

Environment variable are linked to the current execution.

They are found in the execution variables in the project builder.

To access it, click on "Executions management" in the project explorer.

executions management

This will open the project builder page where you can find the environment variables in the special values box.

execution variables

You can find the same information about environment variables in the special values menu.

values of environment variable

Script variable

script variable

The script variables correspond to the variables declared in a script.

In the editor, they can be found in the part dedicated to variables under the project explorer.

script's variables

You can find the same information about script variables in the special values menu.

values of the script variables

Script parameter

script parameter

Script parameters are the parameters that are passed in a sub-script call.

They are found inside of the sub-script call action, in the added parameters.

parameters passed in subscript call action

You can find the same information about script parameters in the special values menu.

values of the script parameters

Assets file

Assets file

The assets file corresponds to the path of all the files that are in the assets (Example: data, resources, etc...). This corresponds to the relative path taken by these files.

The values can be found in the project explorer, in the "Data files" view.

Data files view

You can find the same information about assets file in the special values menu.

assets file values

Passwords

Passwords

The passwords correspond to all the passwords entered in a project.

They can be found in the project properties page.

To access the properties, click on “Project properties” in the project explorer

project properties

In the properties you have access to the created passwords.

project's password in the project's properties

You can find the same information about passwords in the special values menu.

passwords values

Channel values

Channel values

These values correspond to the values returned by a running channel.

Example:

In a script that opens a "Chrome" channel,

If we ask to retrieve the value of the “Application name” in the special values,

Channel values in special values

Then the name of the application opened by the channel will appear.

🔸 Warning

If the channel is not started, then the value cannot be retrieved.

Channel not started message

ATS script values

ATS script vaues

ATS script values are values that are only valued in a Java execution. They only appear when they are taken from the Top script in a Java execution.

ats script values in special values

Calculated values

calculated values

The calculated values are summarized in a drop-down menu.

These values are: Now, Today, Unique ID, Random string, Current iteration, Iterations count

calculated values in special values

The random character variable can take various forms, depending on the data entered.

You can define the number of characters you want to appear and the way they are presented in the variable.

Examples of rnd_string forms:

$rnd(10) ; $rnd(5) =  The value entered will indicate the number of characters to appear

$rnd(10,upp) = Characters will only appear in uppercase

$rnd(10,low) =  Characters will only appear in lowercase

$rnd(10,num) = Characters will appear in numeric form only

$rnd(10,111111222223) = The odds will be stronger on multiple characters. In probability, the string will display more characters that are numerous rather than characters that appear once

Property variable

It is possible to create .properties data files, which are composed of property variables.

You can create a .properties file. from the project explorer, in the data files menu,

The property file looks like a data file with a “key” column and a “value” column.

properties file

Example :

Key : Channel

Value : Chrome

You can also import .properties files from your own computer.

You can sort the values alphabetically using the small arrows in the columns.

You can find the property variable, $prop, in all fields with a burger menu.

In an action, add a special value and select “property variable”.

property file in special values

Select the property file and the key with the value

property file's key

This will retrieve the value from your properties file

$env variable with the property variable

Environment variables defined by playlist type can be used in conjunction with the property variable.

With this action, you can quickly switch from one value to another in all fields that include a $env.

In an action, select property variable from the special value menu

Then, change the property key field with an environment variable ($env).

Example :

If you create an environment variable:

Webbrowser = url1

And a property variable:

Channel = Chrome

Then, you can change the field “Channel” with $env(Webbrowser) to retrieve the value “url1”

If you wish to modify the value of this variable, you can change the value from the environment variables menu so that it applies to the entire project.

execution variables

Still require support?
Contact support