Get Global Variable
Command description
Gets a global variable previously set by Set Variable and saves its value to a new local variable. The equivalent Python code is:
new_local_variable = global_vars.variable_name
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Global Variable Name | str | Name of the global variable |
| Variable Type | enum | Any, Text, Integer, Float, Number, Boolean, DateTime, List, Map, Web Element, Web Page, Desktop Element, Excel Object, Text List, Integer List, Float List, Number List, Boolean List, Web Element List, Web Page List, Desktop Element List, Excel Object List |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| New Local Variable | any | Local variable that receives the global variable's value |
Example
[
{
"ins": "Set Variable",
"in": {
"Variable Type": "'Map'",
"Variable Value": "{'Name': 'John Doe', 'Age': 25, 'City': 'New York'}",
"Global Variable": "True"
},
"out": {
"Variable Name": "userInfo"
}
},
{
"ins": "Get Global Variable",
"in": {
"Global Variable Name": "'userInfo'",
"Variable Type": "'Map'"
},
"out": {
"New Local Variable": "local_var"
}
},
{
"ins": "Print Log",
"in": {
"Log Content": "f'''{local_var['Name']} {local_var['Age']}'''",
"Render HTML": "False",
"Log Type": "'INFO'"
}
}
]