Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you Change Run mode mid script?
#7
Solved: 10 Years, 9 Months, 2 Weeks ago
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 

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"
Reply


Messages In This Thread
RE: How do you Change Run mode mid script? - by RB26578 - 03-25-2021, 08:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 342 11-05-2023, 03:55 PM
Last Post: lravi4u
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,495 11-22-2016, 12:43 PM
Last Post: Ankur
  Dynamic change of name for Webtables prakashreddy 1 2,282 10-25-2014, 09:53 PM
Last Post: supputuri
  How can I change my test folders, globally? atester 0 1,889 10-03-2014, 04:37 PM
Last Post: atester
  How to run driver script to kick off scripts stored in QC? shipu 0 3,397 04-30-2014, 02:39 AM
Last Post: shipu

Forum Jump:


Users browsing this thread: 1 Guest(s)