Saturday, August 2, 2008

8.Tell about descriptive programming in qtp8.2?

A.Descriptive Programming is all about identifying an object uniquely. And there is no defined frame work for it. Frame work depends on the project. This is the code for Yahoo Photos Website you can do the Same for the yahoo by changing the values in the required places.

CODE: Browser ("title: =Yahoo! Photos*.*").page
("title:=Yahoo! Photos*.*").Web Edit
("name:=login").set "srinivas"
Browser ("title:=Yahoo! Photos*.*").page("title:=Yahoo!
Photos*.*").WebEdit("name:=passwd").set "test"
Browser("title:=Yahoo! Photos*.*").page("title:=Yahoo!
Photos*.*").WebButton("name:=Sign In").click

No comments: