Reputation: 305
I am implementing Robot Framework for one of the products, where i have come across a file config.yaml to read all the credentials used to login to DB servers. I want to know how to make Variables under settings section an Environment variable and pass the file from command line.
*** Settings ***
Library RequestsLibrary
Library Collections
Library JSONLibrary
Library OperatingSystem
Variables ../../Config.yaml
I expect ../../Config.yaml to be declared as Environment Variable and Pass it through command line . i.e
robot testfile.robot <path>/Config.yaml
Upvotes: 0
Views: 872
Reputation: 1709
you can try
robot --variable path_config:somewhere testfile.robot
to create variable
and in your import
*** Settings ***
Library RequestsLibrary
Library Collections
Library JSONLibrary
Library OperatingSystem
Variables ${path_config}/Config.yaml
Upvotes: 2