What are properties to use for identifying a browser and page when using descriptive programming





What are the properties you would use for identifying a browser and page when using descriptive programming?

Name property can be use here for this purpose:-

Example – Browser(“name:=”xxxx””).page(“name:=”xxxxx””) …

OR

“misClass” property can also be used by us.

Example like -> Browser(“micClass:=browsers”).page(micClass:=pages”) …


It will work perfectly, Just try it... “USING DESCRIPTIVE PROGRAMMING - - WITHOUT OBJECT REPOSTARY”

Browser("creationtime:=4").Page("title:=Editorial Company Search").Link("text:=Codes").Click'

OR

Browser("name:=Editorial Company Search").Page("title:=Editorial Company Search").Link("text:=Codes").Click



For descriptive programming the object properties should extract 1st using the QTP object repository and then it should use in the code.



Ex., name:= or creationtime:= or title:=base on the objects and available properties
One more simple example:

For any Browser      : name      exm: Browser("name:=My 1Browser")
     For any Page           : title         exm: Page("title:= My 1Page")


Browser("Yahoo! Mail: My best").Page("Yahoo! Mail: My best").WebButton("Check  Your Mail").Click

Descriptive Programming:

Browser("micClass:=Browser").Page("micClass:=Page").WebButton("Name:=Check My Mail").Click

but descriptive programming did not work...the error message will be said the following:

The "[ WebButton ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object.

Now what should do you do... you tried even using WebButton("Check My Mail") or WebButton("innertext:=Check My Mail")...but it did not work even now...Now you need help??

If you have any query, Please feel free to contact me by comments;





















Virtual Objects with Example in QTP
Cross Platform Testing


QTP TESTING STEPS How to Record a QTP Script






No comments:

Post a Comment

Popular Posts