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 |
What is exact difference between “while” and “do while” in QTP ?
What are the Mandatory Properties of WebTable Object and Link Object in Web testing using QTP
how u test a frame in a web page using QTP?
Does QTP work in UNIX environment
5 Answers BirlaSoft, C1 India,
Can anybody give the script to addsheet, add column,add values under that column in the rows??
str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to display the T
Once we get the Test Result from QTP.,I Have to convert into Excel file format..Is it possible..Can any gudie me regarding this... For Example : Total Test Case is : XXXXX Test Case passed : XXX Test Case Failed : XXX -------- Total XXXXXX ---------
what is the script for keyword driven framework in real time?plz its urgent
How to match two doc files using qtp requirment is:- each and every single word of a doc file should be matched with the another doc file. can someone send me the code.
How to create Reusable and Multiple Actions?
How to database testing by manualy?in my db having 100 records when i am retriving the data from db it shows in frent end 30 records how to find bug using QTP?plz Exp realtimers (Chandana)
What criteria do you use when determining when to automate a test or leave it manual?