Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How you can find length of array in qtp?

1034


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

2551


How do you create new test sets in td?

1068


What is post recovery scenario?

2276


In Remote acess server how u run a test?

1726


What is the extension of the recovery scenario file in qtp?

1000


How to execute a winrunner script in quicktest professional?

1038


How will you test a stapler?

1116


What are parameterizing tests?

1043


Brief the process of testing with UFT?

1086


What are test settings and global settings?

1100


Tell me about qtp?

933


Object repositories types, which and when to use?

1077


What is the virtual object?

1172


How to record a qtp script ?

1055