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 |
Hello, I am learning QTP. I have recorded test for Login page, i have also inserted checkpoint for Email field & when I run test it passed. But when i tried to run test by inserting 'Adding Parameter Values to a Data Table' for email & password field, it pass the first value in both the fields but after that when test run for second parameter values it displays 'Internet Explorer cannot open the Internet site, Operation aborted' & when i analyze test result it displays run time error 'Object disable'. I have also cleared all the history from IE but it is not working. Please help me. Thank you.
What are the problems / difficulties faced when you used Smart Identification ?
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
HI All i need one suggestion.is there any companies taking corresponding degree courses. i have 3+ yrs exp in QTP and i am working north side. iam looking for job in south.
Will there be any standards or requirements for page appearance and/or graphics throughout a site or parts of a site?
where u maintain qtp scripts in ur company
What u say as experience(Interview) "TELL ME ABOUT UR SELf"? As a Fresher(interview) What u Say?
How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?
How to change the run-time value of a property for an object?
Hi, Any one have the crack for QTP 10.0,if so could you please send it to phanijuly10@gmail.com
I have below user Defained function function AddTwo(ByVal a, ByVal b) Dim Ans Ans=a+b MsgBox Ans End function Now my question comes here...from given below methods which method is right to call above function?Which is Wrong and why? 1. AddTwo(2,4) 2. Call AddTwo(2,4) 3. AddTwo 2,4 4. Call AddTwo 2,4
How to Practice QTP Scripts?