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

what is verification & validation?

2 Answers   Accenture,


How you perform smoke and sanity testing using qtp?

1 Answers   Tech Mahindra,


Kindly help me with the following queries.. -- How to recognize webtable using QTP and how to use it? -- How would one conclude that it is a web table -- For Example, if there is a web table and I am clicking on say Cell A1, how would i know that i've clicked on cell A1 -- Kindly suggest me to use the web table better

1 Answers  


what is the long form of QTP ?

2 Answers  


How to use transactions in qtp?

0 Answers  






Can any one tell me Difference between Keyword Driven Frame work and Hybrid framework? Its Urgent.

2 Answers   IBM, Wipro,


Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?

1 Answers  


When to use shared and local object repository?

0 Answers  


Is it a smart choice to use QTP for backend testing?

1 Answers   CTS,


i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click

0 Answers   Rogers,


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1 Answers  


How to differentiate the webedit field like user name and password? Please tell any other best answer is ther

3 Answers   Navis,


Categories