hi in QTP 8.2 in the edit box has text like "raju want
married" . i want to check "want" is their in the text
or not ?

Answers were Sorted based on User's Feedback



hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / mahesh_sqa

var="Raju want to marry"
var1=InStr(1,var,"want")
if var1>0 then
MsgBox "String Exists"
Else
MsgBox "Doesn't Exists the String"

Is This Answer Correct ?    8 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / softwaretester4u

after R & D in Qtp i found the solution guys, use Instr()
function is useful for find the text .

Is This Answer Correct ?    1 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / srin

yes preeti you are correct. you can use regular expression.
like "srinkv@gmail.com" if you want to check "srin" in the
syntex it is "srin*" in vbscript & /srin*/ in jscript.

Agree with your comment

Is This Answer Correct ?    1 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / sreekanth chilam

editbox_val="raju want married"
expected_val="want"
d=split(editbox_val," ")
( ...since d is an array....here d(0) contains "raju")
( ..here d(1) contains "want")
( ...here d(2) contains "married")

for i=0 to ubound(d)
act_val=d(i)
if (expected_val=act_val) then
msgbox "want is present - pass"
exit for
else
msgbox "fail - not present"
end if
next

Is This Answer Correct ?    1 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / sri

Hi Friends, Pls check this answer:

s= "raju want married"
d="want"
x= split (s," ")
if Instr(d,x(1))<> 0 then
msgbox "Passed"
else
msgbox "Failed"
End If

Thanks,
Sri

Is This Answer Correct ?    1 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / ana

This can be easily checked with the help of Text Area
Checkpoint as this checkpoint can check the particular
Text/String in the paragraph, particular area can be
selected and checked for the Text/String.

Is This Answer Correct ?    1 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / rangi

use the split and left function and if u dint get i il give
the code

Is This Answer Correct ?    0 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / guest

please write the code.

Is This Answer Correct ?    0 Yes 0 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / srinath

One method is


a="Raju want to marry"
b="want"

if instr(1,a,b) then
msgbox("Exists")
else
msgbox("Does not exists")
end if

another method is
use regular expression. this is a bit lengthy

Is This Answer Correct ?    2 Yes 2 No

hi in QTP 8.2 in the edit box has text like "raju want married" . i want to check &qu..

Answer / rao' prasad

n=InputBox("Enter name")
var=Split(n," ",-1,1)
nam=var(1)
msgbox nam

If nam="want" Then
Services.LogMessage nam,OutputMsg
Else
Services.LogMessage"Failed",OutputMsg
End If

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the extension of script and object repositary files?

2 Answers  


What is meant by Step Generator in Qtp How is it used? pls gimme in detail

7 Answers   AppLabs,


Tell me about userdefined functions ?

1 Answers  


can we call a test in another test?

3 Answers   iFocus,


After Creation of your QTp frame work, The folders are saved in VSS or Other. plz explain brifly?

3 Answers   Infosys,






Is there a function to find the number of occurrences of sub strings within a string?

1 Answers  


ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS

0 Answers  


Whenever we use GETROPROPERTY function.

7 Answers   NIIT,


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

0 Answers  


How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance

2 Answers   BirlaSoft,


Is there anyone can tell me where I can download free or trial QTP? I tried HP website, it was not there anymore. If someone know, pls send me URL. Tks...

1 Answers  


If you are using descriptive programming and you have two objects with the same name, so you are identiying them by name and index, how can you avoid errors if a third object with the same name is added at the begining of the page?

4 Answers  


Categories