How can I replace all the text from the QTP script with
some other text.
Is there any replace all function in QTP
Any one can help me

Answer Posted / aiswaryan

I could not find any function for this. We can do by this
script.

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\ais\Totally Data.doc",
ForWriting, True)
f.Write "Hello world!"
f.Close

this will replace everything in the given file and write
the text ta u hav given.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is test object model in quicktest professional (qtp)?

559


Where we can use the analog mode and where we can use the low – level mode?

576


How to add verification steps to tests?

9136


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

1357


Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance

1748






How to check bitmap output value?

635


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1532


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

2810


How to import a test case present in ".xls" file to TD under a Test set?

755


I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?

626


how to evalute defects in QTP script?

1494


What test you perform mostly? Regression or retesting in your testing process?

583


Have you used xml check point in your project? How?

556


What is the parameterization? Give one example?

600


How did you use regular expressions in QTP and also in WR?

2172