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 how you can find the absolute value of the number in qtp?

648


When to use descriptive programming?

591


please post the interview questions for QA position in FACTSET

3954


What is the use of text output value in quicktest professional?

512


What are the different types of functions available in qtp and explain ?

570






What are private functions in QTP? How they can be called from the function library?

636


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

533


what testplan contents and what test strategy contents,what is the diff b/w them

1651


In qtp, how you can use xpath to identify objects?

618


Describe function procedure in vbscript.

553


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

617


What do you mean by checkpoints in qtp?

561


Explain the types of object repository?

557


In Remote acess server how u run a test?

1288


How can we conduct U-I Testing by using QTP??????

1429