Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can i open a file in Textpad and replace a string with
another using QTP



How can i open a file in Textpad and replace a string with another using QTP..

Answer / 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

More QTP Interview Questions

how to add a runtime parameter to a data sheet?

6 Answers  


supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?

0 Answers   IBM,


Analyzing the Checkpoint results ?

1 Answers   Crea,


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?

0 Answers   BirlaSoft,


What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?

1 Answers  


can anybody give me the links for vb script material

1 Answers  


How to load an object to a object repository at RUN TIME ?

3 Answers  


What is load testing?

1 Answers   Crea,


How many types of Recordings are there in QTP and what are they?

7 Answers   Dangote, First Indian Corporation,


What is the extension of script and object repositary files?

7 Answers   Maveric,


I want to know how to execute the descriptive programming in qtp for the webedit object which does not contain attached text property. but i have checked it with name and html id property. Even though it is not executing. it is giving error in object's physical description.

2 Answers  


what is the exact Diff. Between Test and Component in QTP?

1 Answers  


Categories