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.

Answer Posted / amarendra kothuru

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can i compare two databases using QTP ?

1885


Write a script to customize the test results in PDF and HTML format.

2086


What is the latest version of qtp?

588


What will be happen if i load object repository at run time, but it has already associated.

1260


Explain the difference between call to action and copy action?

524






Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

1742


An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?

576


What is quicktest professional window?

565


Hai anyone please "Explain about Framework in QTP?"

1626


how to find that tools work well with ur existing system?

1356


Please guide me release notes of Automation once scripts are completed

1467


after initiating one project for testing, when exacltly QTP tester role starts?

1403


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1581


I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????

2157


Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

1608