How can i open a file in Textpad and replace a string with
another using QTP

Answer Posted / madhavi

FileLocation="C:\Documents and Settings\\Desktop\file1.txt"

Set fso=CreateObject("Scripting.FileSystemObject")
Set fl=fso.OpenTextFile(FileLocation)
txtToReplace=replace(fl.ReadAll,"QTP","QTP9.5")
fl.Close

Set fl=fso.OpenTextFile(FileLocation,2)
fl.Write(txtToReplace)
fl.Close

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the test fusion report of quicktest professional (qtp)?

746


How to customize checkpoints with parameters?

3226


how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.

1531


what is object and child object.. explain ..if possible give some example for better understanding ..

1744


What is the recovery scenario in qtp?

763


How can I import environment from a file on disk?

758


What is the keyword view and expert view in qtp?

744


I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?

1881


What are the advantages of parameterization ?

808


Can any one tell me.......How the test engg's start testing in the compy environment.....real time tester PLSSSS help me i need in depth information regarding this...

1733


How to give a call to another action from one action?

851


I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com

1719


Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?

1896


Hi , I am facing issue QTP 10.0 with oracle ERP 11i .When QTP opens,click sub links on ERP ,FORM is not opening getting unexpected Internet explorer error message with send or don't send report.So unable to work with forms using QTP.

3628


How many types of trigger events are there in qtp?

751