03-25-2021, 08:27 AM
I realize this thread is old but this may be useful to someone in the future. Here is a walkthrough someone did and is how I solved this issue....
https ://subscription.packtpub.com/book/application_development/9781849688406/1/ch01lvl1sec20/using-a-global-dictionary-for-fast-shared-data-access
Essential I moved my long looping process to a .vbs file & associated in the test within the functional library. For me, the .vbs file builds a dictionary that is used later in the script. Previously this would take 1min+ to build the dictionary during the test in Normal Run mode. Now the dictionary is initialized & built at the beginning of the test in a split second.
Note: I moved the Dictionary.add function from the UFT Action into the InitializeDictionary function
https ://subscription.packtpub.com/book/application_development/9781849688406/1/ch01lvl1sec20/using-a-global-dictionary-for-fast-shared-data-access
Essential I moved my long looping process to a .vbs file & associated in the test within the functional library. For me, the .vbs file builds a dictionary that is used later in the script. Previously this would take 1min+ to build the dictionary during the test in Normal Run mode. Now the dictionary is initialized & built at the beginning of the test in a split second.
Note: I moved the Dictionary.add function from the UFT Action into the InitializeDictionary function
Code:
'-=== myGlobals.vbs ===-
dim GlobalDictionary
Function iniGlobalDictionary()
Set GlobalDictionary = CreateObject("Scripting.Dictionary")
GlobalDictionary.add "myKey1", "myValue1"
GlobalDictionary.add "myKey2", "myValue2"
...
End Function
'-=== UFT Action 1 ===-
'pull value from dictionary
x = GlobalDictionary("myKey1")
print (x)
'yeilds "myValue1"