How to use variables

Browser Automation Studio has 2 types of variables: local variables and global variables. Local variables are available only during thread execution, global variables are available during all script work.

Local Varaibles

Any action, which saves result, uses variable to return result.

Variable name can be changed.

You can input local variables into any input field, just use @ button:

For example, following example saves google page source:

Besides that fact, that almost all functions uses variables to output result, you can create variable manually. Use “Set Variable” to do that:

Here is example, which calculates factorial:

Global Varaibles

Global variables are available during all script lifetime and can be accessed with “Set Global Variable” and “Get Global Variable”.

Global variable has Group and Name, not only Name, like local variable.

“Get Global Variable” command saves current global variable value to local variable.

Next example shows, how global variable can be usefull to parse topics: