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 |
How to Start recording using QTP?
Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek
Can I compare two DataBases using QTP ?
Explain how you can delete excel file in qtp?
Suppose U change the script whether it affect the object properties of the object in the object repository
Hi Friends,I hav Just finished QTP course.Can any body suggest me which is the best place to go and post resume(Ban,Chennai,Pune,Mumbai,NCR,Kolkata).I mean how r calls in these cities,the best one?
what is the frame work your using in automation testing
Can any one give me some basic VB script used in QTP ?As i am new in QTP.Give sample VB script used in QTP? PLZ
What is iteration?
I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error
what is web application and client server application.is there any difference ?
In qtp what type of data tables are used , name and list out them