How to use Text file (Notepad) as ur data source in QTP?
Can u please provide some function code for it?
Answer Posted / gp
For this you need create File system object.
Below code is for reading from text file
Const ForRead=1
Dim objFSO, objFile, strText
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Reading code
Set objFile=objFSO.OpenTextFile("z:\filetext.txt", ForRead)
Do until objFile.AtEndOfStream
strText=objFile.ReadLine
msgbox strText
Loop
objFile.close
Set objFile = nothing
Set objFile1 = nothing
Set objFSO =nothing
"strText" variable will now contain data from text file.
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
can anyone tell me the procedure of interview held in applabs
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
Which operator is used to concatenate the 2 values in the vbscript language?
What are the rules to name variable in vbscript?
Why is the use of exit do or exit for statements within loops discouraged?
Write a Script for ATM in QTP
Explain few date functions in vbscript?
What are subprocedures in vbscript?
What are class properties?
Explain about scrrun.dll?
How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
Which function allows you to instantiate an object given its programmatic identifier or progid?
What is the difference between do until loop and do while loop?
What is the difference between vbscript and vba?