How to use Text file (Notepad) as ur data source in QTP?
Can u please provide some function code for it?
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 |
Explain the operator precedence in vb script?
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?
What purpose does ‘on error resume next’ serves?
int a=4857 i need output as 7584.without using any inbuild function?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
generic function for webedit box for web application
write a vb script to display ***** ***** ***** ***** *****
who you define variables and functions in VB?
write a program to display configuration of a local system with the help of vb script.
WHAT IS ENVIRONMENT VARIABLES?and where it is used in real time scenario?
Which operator is used to perform the comparison among 2 operands in the vbscript language?