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 |
What are class events?
Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function
How are values assigned to the variables in the vbscript language?
Why is error handling required?
How to get the length of the string by making use of the string function?
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.
What is the difference between vb debugger and the script debugger?
Which operator is used to concatenate the 2 values in the vbscript language?
Which constant is used for print and display functions and works as same as pressing enter key?
How to assign a numeric value to a variable?
write a program to display configuration of a local system with the help of vb script.