Ask a Question

Difference between Persistent and Temporary variable

SOLVED
todd2
Contributor

Difference between Persistent and Temporary variable

I am trying to understand the difference between a persistent project variable and one that is temporary.  I am able to store content in a unit script and call that in a keyword test but I cant seem to call that temporary variable again later in the same keyword test. Why?  When calling that keyword test temp variable again  in the script the default value appears and that is not what I want.  I want the value lastname + datetime(now) to be recalled again.

 

todd2

2 REPLIES 2
Marsha_R
Champion Level 3

Here are the definitions

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/common/variables-page...

 

If I were writing your code, I would make the lastname + datetime(now) be a persistent variable. Then there would be a default value and a local value which would change each time an assignment was made.

todd2
Contributor

Thank you, Marsha! I did just that and it works great persistent instead of temporary.
cancel
Showing results for 
Search instead for 
Did you mean: