Variables which are composed of both a partial string and an environmental variable are not recognized, even if both variables are populated and accessible to RobotCode. This is documented in the Variables inside variables section in the official guide.
Example
robot.toml
[env]
ENV_ALIAS = "STAGING"
test.robot
*** Variables ***
${TENANT_PROD} 123456
${TENANT_STAGING} 654321
***Test Cases***
We Are In Staging
Log To Console ${TENANT_%{ENV_ALIAS}}
Should Be Equal As Integers ${TENANT_%{ENV_ALIAS}} 654321
Playground exampleNote: Due to limitations of the Playground environment, I could not replicate my inline example directly, but the essence of the correct behavior should be observable.
Steps To Reproduce
Re-create an example as above (either inline code or the Playground example)
Note how RobotCode flags the first portion of the variable name as well as the compounded name as not found.
Error Examples
Variable '${TENANT_}' not found.robotcode.namespace(VariableNotFound)
Variable '${TENANT_%{ENV_ALIAS}}' not found.
Expected behavior
RobotCode should be able to resolve the combination as a singular variable and not flag these components as unfound variables.
Note that Robot Framework understands the compound correctly and the expected combination is evaluated properly.
Description
Variables which are composed of both a partial string and an environmental variable are not recognized, even if both variables are populated and accessible to RobotCode. This is documented in the Variables inside variables section in the official guide.
Example
robot.toml
test.robot
Steps To Reproduce
Error Examples
Expected behavior
RobotCode should be able to resolve the combination as a singular variable and not flag these components as unfound variables.
Note that Robot Framework understands the compound correctly and the expected combination is evaluated properly.
Desktop
1.93.1
0.93.1
Windows 11 Enterprise
3.12.3
6.1.1
5.4.0
4.14.0