Code:
systemutil.run"C:\Program Files (x86)\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").SetSecure "53ba23c99f935b004bba9a2ac1279aec43b6e7d8"
Dialog("Login").WinButton("OK").Click
Set FSO = createobject("scripting.fileSystemObject")
'FSO.CreateFolder("D:\Poulomi\Test1")
'FSO.CreateTextFile("D:\Poulomi\Sample1.txt")
'set Ofile1= FSO.OpenTextFile("D:\Poulomi\Sample2.txt",2)
Set Ofile = FSO.OpenTextFile("D:\Sample2.txt",1)
'Ofile.Write"HELLO"
Ofile.SkipLine
While Ofile.AtEndOfStream <> true
resobj = Ofile.readline
' msgbox resobj
arrobj = split(resobj,"##")
dtdate = arrobj(0)
flyfrom = arrobj(1)
flyto = arrobj(2)
name = arrobj(3)
txt = arrobj(4)
'
'msgbox dtdate
'msgbox flyfrom
'msgbox flyto
'msgbox name
'msgbox txt
'Ofile1.Write"##"
'Window("Flight Reservation").ActiveX("MaskEdBox").Type dtdate
Window("Flight Reservation").WinObject("Date of Flight:").Type dtdate
Window("Flight Reservation").WinComboBox("Fly From:").Select flyfrom
Window("Flight Reservation").WinComboBox("Fly To:").Select flyto
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set name
Window("Flight Reservation").WinButton("Insert Order").Click
If(Window("Flight Reservation").WinObject("Insert Done").GetVisibleText = "Insert Done...") Then
MsgBox "Pass"
Else
MsgBox "Fail"
End if
Window("Flight Reservation").WinButton("Button").Click
Wend
Ofile.Close
Set Ofile=nothing
Set FSO=nothing
Check out this code.