Robot Framework System Variable inside Variable Yaml file

Issue

This Content is from Stack Overflow. Question asked by SeekerN

Is there a way, robot framework system variables can be defined in Variable Yaml file.
For example; I’ve a yaml file like

testdata.yaml

key: ${EXECDIR}${/}mydir

Importing file in robot Test Case:

*** Settings ***
Variables  testdata.yaml

*** Test Cases ***
TestCase1
  log  key1

This is literally printing “${EXECDIR}${/}mydir” rather than the value of EXECDIR.

EXECDIR is just an example, I’ve a requirement to use many robotframework system variables inside yaml in customized way.
I’ve checked an existing question, How to access a variable inside another variable in yaml file?. But this refers to user defined variable. Is the same limitation applicable for system variables as well?

If it’s not possible then I would have to use
Yaml Load and create another variable holding yaml content in Robot framework dictionary.
But I would prefer:

*** Settings ***
Variables   testdata.yaml 



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?