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 r the diffrernt file extentions in QTP?
write script for finding number of broken links in web page? kindly please answer my question.
3 Answers Manhattan, Oracle, Virtusa,
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
How to work with multiple browsers when opened in the window, write the script for it
What is system testing and what are the different types of tests you perform in system testing?
write a function to read the items from Combobox of Flight Reservation application and save in excel.
How to release all resources file from the QTP?
How to load the object repository at run time?
What is an expert view and keyword view?
Consider a scenario where there are two action sheets say action 1 and action 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how?
How to give Table check points?
It is regarding VBScript, how to export our function results to ExcelSheet through VBscripting. Ex: I have written add function, that result should export to Excel.