please write a script to find the text in a application.
Note: i dont know the location of that text where it is
located. just like negative testing.
Answers were Sorted based on User's Feedback
Answer / gangadhar reddy
a=Dialog( ).GetTextLocation("OK",x1,y1,x2,y2)
msgbox a
if a=True then
msgbox "text found"
else
msgbox "text does not found "
end if
'OK=text string to be found on app
'x1,y1,x2,y2 are the coordinates
try this once you get the result
Is This Answer Correct ? | 0 Yes | 1 No |
In general, In the web application, The text can be
recogized by QTP as WebElement. If you on what page it
should be displayed, Then it is easier to verify that text.
For Example
Text = "Welcome to Yahoo"
Result = Browser("name:=Yahoo").Page
("title:=Yahoo").WebElement("inntertext:=& Text).Exist(0)
If Result = True Then
Reporter.ReportEvent MicPass, "Text found", "Passed"
Else
Reporter.ReportEvent MicFail, "Text not found", "Failed"
End If
If you want to verify ur application, Pass the exact Object
Property values as per the Hirarchy
Is This Answer Correct ? | 0 Yes | 3 No |
I am struggling to understand QTP more from descriptive programming point of view. Is it easy to learn good QTP in South india by good faculty than north india? I found a great lack of institution in here. can you suggest me better instituion. I am holding two years of experience in same company, is there possibility in south india for me?
what are the environment variables,how do you use them. give an example.
can u Give Procedure to Handle Pop Window & write Code for that
where exactly we can't do the automation testing. give some examples
Can we write winrunner language i.e TSL in QTP tool?
In project module it contains 3-ok buttons with same properties who qtp identify its objects while runing ??
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
What is the syntax to call one action in another?
how to retrieve the column headers in database using vbscript statement in QTP
Hi experts. I want to create a framework for the Flight Reservation sample application.Can anybody tell me the files and the contents , and how to create them.Thanks
what testing activities u may want to automate?
WHAT IS OBJECT REPROSITORY?