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
What is action? How many types of actions are there in qtp?
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
Explain the concept of object repository and how qtp recognises objects?
Get the count of files of similar types from a folder.
How can I check if a environment variable exist or not?
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
When do go for loop condition in test?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
What is quick test pro?
what is the difference between data driver & data driven and driver script?
In qtp, how you can remove the spaces from string?
Explain how you can delete excel file in qtp?
I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, if possible, kinldy mail PDF file to my mail-ID: ramakrishna908@gmail.com Regards, krishna.
Explain how qtp identifies object?