Forum Discussion

Nayak_Ragh's avatar
Nayak_Ragh
Occasional Contributor
4 years ago

Project variable to be used across different tests

I am having a Desktop application where one test captures certain dynamically generated ID and it needs to be passed as an input to another test.   Ex: Var1 is captured in Test1 - Unit1 script, thr...
  • tphillips's avatar
    tphillips
    4 years ago

    You need to create the variable at the project or project suite level if you're using keyword tests

    If you're scripting you can add project or project suite variables in the script itself:

    Project.Variables.AddVariable("MyNewVariable", "String");

     

    Refer to the documentation for more information:

    Project/Project Suite Variables in keyword tests 

    Project/Project Suite Variables in scripts 

     

    Actually using them is much the same as in your original question in the other thread.