Example -
Below code will Read a text file in QTP
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\mytestfile.txt", 1)print
Above code will read all data from c:\mytestfile.txt file and print it in QTP.
This is how we can read a text file in QTP.
Below code will Read a text file in QTP
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\mytestfile.txt", 1)print
f.ReadAll
Above code will read all data from c:\mytestfile.txt file and print it in QTP.
This is how we can read a text file in QTP.
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs