12-15-2009, 06:23 AM
(This post was last modified: 12-15-2009, 06:37 AM by sunnyvale69.)
Hi - I am new to QTP and VB Script as well. I have recorded few user actions to create an order. At the end of my script it is creating an order. eg: An order# 123456 has been created successfully.
1) I would like to write this value (123456) to a text file (order.txt).
2. Launch Another URL to verify Order. Read the above order# from order.txt and type into a textbox..
Could someone guide me how can I acheive this?
I found this login elsewhere to write somethign to a file. I tested that it is writing "helloworld" in my test file. But I am not sure how to write a new order# into the file.
1) I would like to write this value (123456) to a text file (order.txt).
2. Launch Another URL to verify Order. Read the above order# from order.txt and type into a textbox..
Could someone guide me how can I acheive this?
I found this login elsewhere to write somethign to a file. I tested that it is writing "helloworld" in my test file. But I am not sure how to write a new order# into the file.
Code:
Dim fso, new_file
Set fso = createobject("scripting.filesystemobject")
Set new_file = fso.createtextfile("c:\testfile.txt", True)
new_file.writeline("hello world!")
new_file.close