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   To Refer this Site to Your Friends   Click Here
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
How can I find out whether a word in a string is existed or 
not
for example 
"QTP IS A POWERFULL TOOL FOR AUTOMATION"
How can i find out whether "powerfull" is existed in the 
above string or not
Could anyone answer it?
 Question Submitted By :: Rayudu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?
Answer
# 1
Create a filesystem object . Read the file till the 
letter "P" comes . After that Read till the length of the 
word which you want to Check (In this case it is 9). then 
compare the word with the word which you want to check 
which should have been stored already . If the 
stringcompare is true means, the word exists. Please go 
through the following code for this example 

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objReadFile = objFSO.OpenTextFile("FILENAME" ,1)
Str="Powerfull"
Str1=objReadFile.ReadAll()
Set objReadFile_new = objFSO.OpenTextFile("FILENAME" ,1)
For i = 1 to len(Str1)
Str2=objReadFile_new.Read(i)
if Str2=Left(Str,1) then 
Str3=ObjReadFile_new.Read(len(Str))
if Str3=Str then 
Msgbox "FileExist"
Exit For 
End if 
Next
 
Is This Answer Correct ?    0 Yes 0 No
Nithya.m
 
  Re: How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?
Answer
# 2
I think u just need to use

INSTR() that's it.
 
Is This Answer Correct ?    2 Yes 0 No
Anshu
 
 
 
  Re: How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?
Answer
# 3
just assign  that entire string to a variable & use either
instr or strcomp thats it
 
Is This Answer Correct ?    0 Yes 0 No
Akshar Jain
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How QTP recognize the object??how to add objcts into object repository??  1
Hello, How can i capture first letter of any string using QTP. For ex.. i want "j" in the below string "john" could any one explain me? Is there any function for that? Livetek2
For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that ............. Satyam3
1.How recognize QTP Dyanamic Image? (suppose tha wedpage contains 3 logos..1 square 2.circle 3.rectangel)there changing at same position how to capture that) Synechron2
Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.  1
How the automated tests in org Maintec1
How to execute a WinRunner Script in QTP? IBM1
I am using Shared OR, and my collegues are also using Shared OR. How to merge Object Repositories?  6
Difference between keyword driven test and DDT?  1
What is the Maximum syncronization timeout in seconds in QTP 9.5 Polaris4
write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this? IBM2
can we use QTP for load testing instead of load runner?  3
in QTP,how to write a descriptive program for "yahoo" or "gmail" Login page  1
What is VSS? Is it used in Automation(QTP) Or Manual? what is menus in VSS? TCS3
dar Sir I am Facing th eProblem in QTP thet ,when I start thrcording inthe QTP for the ASP front end and C# the Coding Language I fing that recording is Done well for the Login screen but at the Time Running the script the QTP is Unable to Identify the Objects On the Objec Onht eLigin screen .Please answer the Question in Description and the Propables reason I might be facing alsp the Popable solution I have to Take thanks and ragards  1
What is BPT?  2
How i can use and create Library functions in QTP and what is the proces .  1
what is the mediater between qtp and application/project in automation testing?  1
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  1
In a Web appl, on a page, there are student names & details listed.On clicking sort button,details are sorted on Names.How do u verify htat sorting is done by using QTP? IBM1
 
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