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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How you debug your script?

1060


one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.

1946


How to creating an output value using quicktest professional?

1054


how to test load test and block box testing an a web based application pls give ans briefly

1829


What are the types of object repositories? Which one is you are using?

1180


Difference between copy to action and call to action?

1012


please post the interview questions for QA position in FACTSET

4430


When to use descriptive programming?

1114


what is keyword driven testing in qtp?n how is it useful?

1909


What is the difference between the keyword view and expert view?

960


can any one say that where we can download the QTP trail version ??????????

1754


what is ODC and GDC?

7871


How will you check that your test cases covered all the requirements?

1054


I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?

1827


What is the difference between qtp and selenium?

1036