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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
HI. AnyBody can explain Automation Testing Framework...Generally wht do we Intiate before going to start Automation testing process... Anybody can explain.......Thanks in advacne...
hai friends i already ask this question but when i post the question the alignment goes wrong .....my question is we have a WEB TABLE ....assume that web table having 3 row's and 3 column here in 2nd row 3rd column having VISIT FACEBOOK link...now i want to check the VISIT FACEBOOK link is available or not ..if it's there i want to click the link ...then how to find the web table row or column count ....don't write the excel or data table script here friends .....consider that it's a WEB TABLE do a favour ...thank's
How u call functions in QTP Function to calculate the length of characters in a wor
Per-Action Vs Shared repository?
Is it possible to change the extension of Shared object repository?
How to add object to object repository in qtp9.0 Suppose for brower yahoo home page
Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.
How to "Turn Off" QTP results after running a Script?
How can i see test results in excel sheet ? test data not present in data table.
Hi, i am rani ,i am putting 1+years of fake exp ,so pls anyone explain how i get project (in real time) ? how it is tested ex: in banking ,test the number of textboxes in one window
how to generate numbers in between to numbers suppose numbers in between 500 to 1000 in sequencies using vbscript
How QTP support all types of applications (platforms)?