how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP"

Answers were Sorted based on User's Feedback



how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP&quo..

Answer / pankaj jaju

strArr = Split("QTP+QTP=2QTP","QTP")
numOccurrence = UBound(strArr)

Is This Answer Correct ?    18 Yes 1 No

how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP&quo..

Answer / tejesvini

Str1 = "QTP+QTP=2QTP"
var1 = Split(Str1,"QTP")
var2 = Ubound(var1)
msgbox var2

Is This Answer Correct ?    8 Yes 0 No

how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP&quo..

Answer / suresh meti

Str1 = InputBox("Enter any sentese ")
str2 = InputBox("Enter word to search")
var1 = Split(Str1,str2)
var2 = Ubound(var1)
msgbox var2

Is This Answer Correct ?    6 Yes 0 No

how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP&quo..

Answer / lavanya

Str = "QTP+QTP=2QTP"
for i=1 to len(str)
amid=mid(Str,i,3)
Msgbox amid
if amid = "QTP" then
cnt=cnt+1
end if
Next
MsgBox cnt

Is This Answer Correct ?    2 Yes 1 No

how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP&quo..

Answer / anwar basha

str="QTP+QTP=2QTP

str1=len(str)
k=replace(str,"QTP","")
str2=len(k)
msgox str1-str2

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

How to capture screen shots when an error occurs?

2 Answers  


What is load testing?

1 Answers   Crea,


pls tell me how will you write the vb script in QTP for DataDriven test from Excel sheet for multiple userid and password explain with example

6 Answers   Ordain Solutions,


I open login gmail page after that QTP is not able to identify the object present in it then what u will do

3 Answers   Accenture,


how can we do the frame work in qtp

0 Answers   L&T,






how we can know qtp has used smart identification machanism during the execution.

3 Answers   IBM,


what is active screen,keyboard view?

2 Answers   BirlaSoft,


According to use, how virtual object is different from object spy? If Qtp is not learning a sub-menues. What should we done? how would we manage on the expert view too? alkaa.dugaal@gmail.com

1 Answers   HCL,


7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell data which is equal to the given number say:123. Assume you have given with the column name/id of the table where the number may exist. So now you have to go to the given column and search for the number 123 and retrieve it along with the row number of it.

4 Answers  


Write a script to verify font style and color of a windows object using descriptive programming

0 Answers  


what is purpose of automation?

3 Answers  


I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .

0 Answers   Livetek,


Categories