Creating a variable list to use throughout my scripts - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Creating a variable list to use throughout my scripts (/Thread-Creating-a-variable-list-to-use-throughout-my-scripts) Pages:
1
2
|
RE: Creating a variable list to use throughout my scripts - mv8167 - 02-28-2012 My ImageAccessVariableList.vbs file is rather simple. Code: IterationCount = Datatable("IterationCount", dtGlobalSheet) As I load the file, (either by) File->Settings-> Resources->[+] (or by) ExecuteFile "O:\QTP Tests\QTPInputData\ImageAccessVariableList.vbs" the variables do get added to the variable list tab of QTP. But on exiting ImageAccessVariableList.vbs, the QTP variables tab is then empty. My goal is to use certain variables throughout my testscript and all of my added library functions that I can call at any time. Currently I must pass values through my function calls or re-intialize variable values. Example: I need to know the FaxCount value in multiple functions that reside in different libraries. Thoughts of what i am doing wrong? Must i call the "ExecuteFile "O:\QTP Tests\QTPInputData\ImageAccessVariableList.txt"" in every function? thx for looking ;-) (see attached PDF) RE: Creating a variable list to use throughout my scripts - inborntester - 02-28-2012 can you move associated functional library ImageAccessVariableList.vbs to bottom most by down arrow button in the test settings resource tab and try ? RE: Creating a variable list to use throughout my scripts - mv8167 - 02-28-2012 Sure, I had mine at the top. Does this matter? I guess I will see. thx Yupdate: Yes, i can now use the variables in my vbs file. I dont see them loaded in my Variables tab (to refer to durring testing) but this "seems" I hope to have worked. thx Now to see if i can update and change thesed values with my Run. ;-) |