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 |
Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.
What is regular expression?
You have a WebTable in Web application. When you Record a Scenario using QTP, WebTable didn't recognized and also Repository is not having Webtable information. In this case How to find RowCount and Coloumn Count?
in qtp wha t is synchronisatin pt,what is the maximam time out
What is throw object?
In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!
What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?
anyone can explain about "Hybrid framework" in QTP
what kind of frame work you used in your last project?
What is the extension of qtp local repository?
What are the disadvantages of recording test cases in qtp?
When we parameterise some field ex. Textbox is there any way that we can generate a specefic number of random values (For alphabetical values if possible) instead of manually entering values in the data table