OPening of notedpad in QTP to write and execute the coding?

Answer Posted / nanda

set fso = createobject("scripting.filesytemobject")

file_path = "c:\nanda.txt"
forwriting =2
forreading = 1
set notepad = fso.createtextfile(file_path,forwriting)
notepad.writeline "this is created by Nanda"
notepad.writeline "this is created on "& now
notepad.close

set notepad = fso.opentextfile(file_path,forreading)
for notepad.atendofstream
n = notepad.readline
msgbox n
Next

this script will create a notepad and write data and read
data in that file.

If any queries...
nanda.dreddy@gmail.com

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can get count of list box?

877


How do you configure QTP AND Test director?

1722


Explain in brief about the quicktest professional (qtp) automation object model?

790


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1659


What is the expert view?

778


what function you write to do database testing with the help of qtp?

1611


How will you test a stapler?

854


How the exception handling can be done using quicktest professional?

794


When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.

1909


What are the different attributes used with regular expression?

788


How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?

767


Analyzing the checpoint results?

815


What are the steps involved in the recovery scenario wizard?

811


Explain in brief about the qtp automation object model (aom).

755


What are the types of environment variables in qtp?

820