1

Trying to set an env var using robot script

${res}=  Set Environment Variable  ABCDE  12345

But when I check the env vars from my shell, I am not able to find it!

grep-ing the env var key in shell

Robot Logs:

Robot logs

1
  • Side note: the Set Environment Variable keyword does not return anything. So, it is useless to store the result in a variable Commented Apr 12, 2022 at 8:19

1 Answer 1

3

Environment variables are local to the process in which they are created. They are inherited to child processes, but not to parents. That's why you can't see them in the calling process. *ix shells have a special export command to export environment variables, but there is no export feature in Robot Framework. So, AFAIK this is not possible.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.