Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating a variable list to use throughout my scripts
#11
Not Solved
My ImageAccessVariableList.vbs file is rather simple.

Code:
IterationCount = Datatable("IterationCount", dtGlobalSheet)
YesNoRun = Datatable("IterationCount", dtGlobalSheet)
ACCT1 = Datatable("ACCT1", dtGlobalSheet)
CurrentRow =  DataTable.GlobalSheet.GetCurrentRow
ENV = Datatable("ENV", dtGlobalSheet)
C = 0    
FaxCount = 0

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)


Attached Files
.pdf   txt and vbs file are the same.pdf (Size: 123.44 KB / Downloads: 75)
Reply
#12
Not Solved
can you move associated functional library ImageAccessVariableList.vbs to bottom most by down arrow button in the test settings resource tab and try ?
Reply
#13
Not Solved
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. ;-)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Excel template for mapping manual scripts to Automation scripts. ACCBAJPA 0 2,827 09-19-2013, 03:02 PM
Last Post: ACCBAJPA
  Creating Random String SomeIntern 0 4,760 08-21-2013, 09:10 PM
Last Post: SomeIntern
  Problem in creating excel object kriday 1 2,190 07-13-2013, 12:45 PM
Last Post: Ankur
  Creating multiple lines under a header - SAP Fredodo 7 5,315 01-02-2013, 04:54 PM
Last Post: Saleel Prabhu
Shy Resetting a variable list vbs file mv8167 0 1,974 11-03-2012, 12:23 AM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 1 Guest(s)