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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 ?    3 Yes 1 No
Rico
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
When testing a web application, the url for each page changes, so using QTP how do u handle this scenario. If anyone knows please answer in detail about the whole procedure. Thanks a lot.  2
How we can add actions in the test using QTP?  2
While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am getting syntax error whereas if I use the variable in script file, the script works fine. Can anyone help me in finding the reason behind this?. E:g Dim intStartRow (Define in Lib File----- say abc.vbs) Dim intRow (If I define this variable in Lib file I am getting Syntax error where as if I define in the script file ---- say xyz.mts the script works fine) IntStartRow=2 For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count ‘Some Code here Next  1
Hi everybody, Can anybody tell me that how the QTP frameworks are implemented . I wanted to know with examples . Thanks in advance  1
What is Data driven Testing Frame work.Anybody can expain it in Detail.. Pls anybody can give the answer.. Thanks in advance... Navis1
HoW to open QTP in Real time.after getting the qtp window how to log in .pl answer real time people GE3
How QTP recognize the object??how to add objcts into object repository??  1
what is stlc and its contents?  1
How can you find Local Host Name by Using QTP?  4
will QTP 9.2 run successfully on Linux(gui) operating system  1
How does Parameterization and Data-Driving relate to each other in QTP?  2
How to merge the two object repositories Wipro2
How to identify the child window. In my case while recording, When i open new window and give checkpoint for some control and when i run that script QTP give error like" can not identify the object" Is there any method or solution to handle child window issue Note: In my apllication i have to check child window of child window also ( multiple windows open ) Infovision2
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code  1
Please explain me in detail! How to handle runtime errors in QTP useing recovery senario or with out scenario Quinnox4
what are recovery management techiniques?  1
what are the attributes of QTP?  3
what is the use of descriptive programming in QTP ? when we need to use DP? can we test the application completely with out useing DP?? please explan with example  2
After geting the modules where we generate the script ie in qtp or notpad ?  1
Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop (i.e. I first connect to remote desktop from my machine in order to run the application). I am able to record the script successfully with QTP running on my machine and application running on remote. However, when i run the recorded script, system fails to run it and indicates me that it does not identify the object. Is it possible to record and play while QTP and AUT are not on same machine?  6
 
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