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

Write a command for setvalue function in a webedit

3 Answers   Wipro,


suppose u hav a dialog or window which contains 10 buttons with same name & value. now how to check each button? i.e. how qtp indetifies these objects separately?

2 Answers  


Discuss quicktest professional environment?

0 Answers  


I Have web table shown below ----------------------------------------| | orcut | GMAIL | NAUKRI | |----------|---------|-------------------| |HOT MAIL | MONSTER | VISIT FACEBOOK | |----------|---------|-------------------| |SKYPE ACC | IRCTC | GOOGLE | --------------------------------------- Here i have 2 question friends.. 1.i want to chick the link "VISIT FACEBOOK" is there or not if it's there i want to click the link 2.here how to find the web table row or column count ... don't write the excel or data table script here friends ..consider that it's a WEB TABLE

3 Answers   HCL,


Hi any body can tell me the synchranization point syntax thanks in advance

6 Answers   AppLabs,


How can i check items sorted or not in a weblist ? Give me the script for this...

0 Answers  


Hi Friends, I'm new to QTP. I want to write a function in QTP for below senario. In an Excel sheet column B, I Have 10 Url/Links, and in Colum A there is a Flag as Y and N. My test should run only on those iterations which are flagged as Y. Please help, Thanks

6 Answers  


any challange that faced in your project? (please give me some examples in your project?

1 Answers  


what is the syntax for regular expression in QTP? how to create user defined functions in QTP?

6 Answers   CTS, MBT, TCS,


write vbscript in qtp tool for senario, in the given sheet add each number in each row and each colunm and show result

3 Answers   Mind Q Systems,


Recovery Manager means..?

4 Answers  


any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in

0 Answers  


Categories