I am trying to read a config file in my VAPI test case in QC. Following is the code snippet:
Set objFSO =CreateObject("Scripting.FileSystemObject")
Set objFile=objFSO.OpenTextFile(strFileName,1)
strText = objFile.ReadAll
objFile.Close
However I am getting the following error: Operation is not allowed when the object is closed.
I am able to use the same code if run it from outside of QC in simple .vbs file.Can anyone please help me out with this. Thanks