Micro Focus QTP (UFT) Forums
QTP 10 QTP & VBScript - 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: QTP 10 QTP & VBScript (/Thread-QTP-10-QTP-VBScript)



QTP 10 QTP & VBScript - SRA - 08-27-2010

Hi -

I see many examples of VBScript but not how they work with QTP. All I see is the script, no trace of QTP.

If these questions are answered, thanks in advance, I could have a better understaning of how VBScript is integrated into QTP.

1. Are VBScripts located in an external file?
2. Is this external VBScript file called from within QTP?

- Bill


RE: QTP 10 QTP & VBScript - SRA - 08-27-2010

For example, let's say you have this QTP script:

Code:
Browser("IFS :: Intelligence Fusion").Page("IFS :: Intelligence Fusion").WebElement("Avalanche(Structured Search)").Click

And you have a VBScript.
Code:
Environment.Value("Execute")="Yes"
  
      Msgbox "This is Action1 code"
      RunAction "Action2",OneIteration
      RunAction "Action3", oneIteration

  Environment.Value("Execute")="No"

How do the 2 merge in QTP? What does the final script look like?

Can anyone answer this question?