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 Posted / sunil

Dim str,word

word=inputbox("enter the word for search")
str=inputbox("Enter a Sentence")
if instr(1,str,"word") then
msgbox "Searching word is present in the sentence"
else
msgbox"Searching word is not present in the sentence"
end if

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create scenario selector

1469


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1411


Name the different types of recording modes?

570


Hi Samrat, Thank u very much, what u said it is right.

1340


How to find a window is minimized or not

1436






What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz

1468


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

690


What is text check point and text area check point?

600


What is the syntax to call one script from another?

530


How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

1542


How does you pass optional arguments in qtp?

559


Why do we use breakpoints in QTP?

577


Explain how qtp identifies object?

601


Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also

1857


How does qtp recognize objects in aut?

578