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 QTP batch testing tool?

2 Answers  


3. How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers   Wipro,


What is the life cycle of QTP? Pls Give me Exact answer?

6 Answers   Google,


Hi, I have 2 dropdown listboxes called region and city/area. It needs to select one region(Santa Clara) and one city/Area (Sunnyvale).So I put this in the for loop and I am storing the Items in the variable called itemname. The regions value will get changed,so I used reg expression for this regions. This is my code Browser("MLSListings.com").Page("MLSListings.com").Link("» County/Area").Click Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Check CheckPoint("regions") ListSize=Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetTOProperty("items count") For i = 1 To ListSize-1 Itemname =Browser("MLSListings.com").Page ("MLSListings.com").WebList("regions").GetItem(i+1) Browser("MLSListings.com").Page("MLSListings.com").WebList ("regions").Select Itemname ................. If I run the script,I am getting the following error, Cannot identify the specified item of the regions object. Confirm that the specified item is included in the object's item collection. Any Help? Thank you, Uma

0 Answers  


What does VBS file contain?

1 Answers  






How can I generate customized logs in QTP ?

2 Answers   Ordain Solutions,


How to recognize and read data from pdf file using Descriptive Programming in QTP?

1 Answers   Satyam,


How open an excel sheet in QTP(not a run time )?

4 Answers   Tech Mahindra,


What is the basic concept of quicktest professional (qtp)?

0 Answers  


Does quicktest professional (qtp) is unicode compatible?

0 Answers  


HI I want to know the detials of QTP certifications such as syllabus, study Materil etc. Can any provide me all these details?? my mail ID is krishnuvk@yahoo.com

0 Answers  


What are the enhancements u did after recording ur script?

1 Answers  


Categories