ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
I want to open a text file and then search some specified 
text in it and then replace that text with some other text 
i found that text in .txt but do not know how to replace 
that text can any body help me. if possible put the code 
for qtp
 Question Submitted By :: Ankur_jain
I also faced this Question!!     Rank Answer Posted By  
 
  Re: I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp
Answer
# 1
Const ForReading = 1, ForWriting = 2
  Dim fso, f
  Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("c:\working\replace.txt", 
ForWriting, True)
   f.Write "QTP QTP RFT QTP QTP RFT QTP QTP"
   Set f = fso.OpenTextFile("c:\working\replace.txt", 
ForReading)
   ReadAllTextFile =   f.ReadAll
   newText = Replace( ReadAllTextFile, "QTP", "QTPRO") 
  Set textFile = fso.OpenTextFile
( "C:\working\replace.txt", ForWriting )
  textFile.WriteLine newText
  f.Close
 
Is This Answer Correct ?    2 Yes 1 No
Rico
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is the advatages of merging of object repositories in Qtp9.0 TCS2
what is the script(qtp) to export and import the datas from MSaccess to Excel sheet.if anybody know plz tell me.  2
How do we run the scripts in QTP ?? what are the three options.... HCL3
HOW DO U CALL A ACTION IN QTP? BirlaSoft2
Maximum synchronizing time out in QTP Kanbay2
what are the different data driven types?  6
What is a runtime datatable ? Ordain-Solutions2
what questions i have to pripare for project manager round interview ? plz give Ans.(Chandana) TCS3
If there are 10 notepads opened on desktop. how can we close a particular 2nd notepad using script  2
In my application there is a billing thru credit card. how to validate the credit card details(min balance,credit card no,card holder name).if these details are valid then only that booking will be done.how to validate these details thru automation or manual?  1
in how many ways you perform batchtesting? Sapient2
Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this? IBM3
Is there anyone can tell me where I can download free or trial QTP? I tried HP website, it was not there anymore. If someone know, pls send me URL. Tks...  1
what is virtual object?  2
How to test login page by using QTP  5
what ar the challenges do we face while testing webbased applications using the automation tool qtp or any? TCS4
Thanks Rag... One more question, How we test the dynamic images which frequently changed?Using the bitmap checkpoint r any other options available.... Can u give the steps pls... Thanks  1
IF THE GUI OF APPLICATION IS CHANGED THEN IS THERE ANY NECISSITY TO CHANGE OR UPDATE OUR TEST SCRIPTS  2
Where can i get the QTP tutorials. I wanna move to automation testing. Is there any book or URL, where i can find the source to read...  1
Hello Everybody, please tell me how to use accessibility checkpoint and XML checkpoint by giving any practical example of it.please provide me the steps to perform that and also pls provide the code too. Thanks in advance, Gaytri  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com