Interview Questions

How to use values returned by VB script in winrunner?

Mercury WinRunner FAQ


(Continued from previous question...)

How to use values returned by VB script in winrunner?

From your VB script create a file system object to write output to a text file:
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)
MyFile.WriteLine("This is a test.")
MyFile.Close
Then use file_open and file_getline functions in WinRunner to read the file.

(Continued on next question...)

Other Interview Questions