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

difference Between Call Run action and copy of action?

3 Answers   Quest,


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

0 Answers  


do you prepared framework,pls answer this

1 Answers  


In where you are keeping or maintaining shared object repository (file)in your appliction?

2 Answers   Inlogic,


what are the cases in which we use XML and accessibility check points.

2 Answers  


wt is frame work wt r d different types of frame works used in ur company

1 Answers   Infotech,


can we run the scripts of qtp 8.2 in the qtp7.0?

1 Answers  


Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please

0 Answers   IBM,


What is the difference between browser sync and page sync in QTP?

2 Answers  


Do we get any issues if we run the test script on differentbrowsers?what are the options we need to set in QTP?

3 Answers   CTS,


what the diffference between test data and test cases what is meant by object hierarchy in qtp

4 Answers   Virtusa,


Hi, one script having 10 Actions,but i want to execute only 3rd action and 7th action? how to execute selected actions? throgh script and through navigation?

2 Answers   IBM,


Categories