How can we test existence of a particular word in scentence
using QTP tool.

Thanks in Advance!!!!!

Answers were Sorted based on User's Feedback



How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!..

Answer / aiswaryan

By using "Instr" function u can do it.
InStr([start, ]string1, string2[, compare])
eg: MyPos = Instr(1, SearchString, SearchChar, 1)
msgbox MyPos
If Mypos returns a non-zero value, then the particular word
is present in a given string/sentence. If MyPos=0, then the
word is not present.

Is This Answer Correct ?    4 Yes 1 No

How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!..

Answer / ganesh

yes we can check the text using the Text checkpoint.

Is This Answer Correct ?    3 Yes 0 No

How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!..

Answer / kalyan

Using strcomp method we can check the string.

In web application string will be recognized as web element.

In window based application string will recognized as static.

first of all we have to capture the actual string which we
need to test. Then assign this to one variable. And allready
we have expected string. Assign this string to one variable.
then compare to strings with one more variable with help of
strcomp method.

If any clarifications mail to me. I will give detail
explanation with example. mskalyan.smile@gmail.com

Is This Answer Correct ?    1 Yes 0 No

How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!..

Answer / andy

I think we can do that by inserting Text Checkpoint.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

difference between waitProperty & Checkproperty

4 Answers   AON,


Hello Everybody, Please tell me can we create Test Plan in QTP? This I am asking irrespective to integrating with Test Director.I mean is there any option to create Test Plan in QTP itself. Thanks, Gaytri

4 Answers  


what are the different u notice in betweem QTP version 8.2 and 9.2 and what is new in QTP9.2

1 Answers  


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

0 Answers  


Give me exact application where we should use low level recording?

6 Answers   CTS,






In Datatable having the data like this S.no Name Address 1 raj hyderabad 2 suresh Mumbai 3 shyam chennai 4 dev banglore i want to get the shyam row id & column id using scipting i.e 3,3

4 Answers   Broadridge,


what is defination of system testing?

3 Answers   CodeArrow, Infosys, Omax,


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

5 Answers   IBM,


when to start the automation?

0 Answers   Accenture,


In a webtable,a list of values are there,rightnow one values shows,later random another values shows,but how to retrieve the random value in webtable.

1 Answers   HP,


In qtp, how you can exit for loop?

0 Answers  


Diff b/n image n bitmap checkpoints?

2 Answers   iGate,


Categories