How to read text file using UFT
We access the text file in UFT by using the filesystemobject. The UFT will read all the data line by line. Below is the sample code which can be used to read any text file.
Set FileSysObj=CreateObject("Scripting.FileSystemObject")
Const ForReading = 1
Set txtFile = FileSysObj.OpenTextFile("<textfile>", ForReading, True)
Do Until inputFile.AtEndOfStream
msgbox inputFile.ReadLine
msgbox inputFile.Line
Loop
inputFile.close
You can use any conditional statement in the code which can be used to extract the required data from the text file.
Set FileSysObj=CreateObject("Scripting.FileSystemObject")
Const ForReading = 1
Set txtFile = FileSysObj.OpenTextFile("<textfile>", ForReading, True)
Do Until inputFile.AtEndOfStream
msgbox inputFile.ReadLine
msgbox inputFile.Line
Loop
inputFile.close
You can use any conditional statement in the code which can be used to extract the required data from the text file.
Ojuncvastruc_o Gary High https://wakelet.com/wake/SCVEgCTGXQaeKlPqQC-6i
ReplyDeletecarsingwhisfi
0cebuAremp_bi1987 Sharon Cook MorphVOX Pro
ReplyDeleteThe Bat!
https://wincracks.net/category/business-tools/
ligangtergder
UmonspecZtracheDowney Carlos Ruiz Click here
ReplyDeleteBest
carnidoma