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
How smart identification works in qtp ?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.
What are the types of object repositories? Which one is you are using?
tell me abt a time when u had to go above &beyind the call of duty to get the job done
Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.
What is reusable action?
can any body give the banking domain concepts/links
Can we use index on view?
Hi How to retrieve data from web element line by line?
Diff b/w test scenario's and test Procedures?
In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.
When to use shared and local object repository?
is there any addin for remedy user application