Friday, 7 October 2016

Descriptive Programming

Descriptive Programming:- Descriptive Programming is directly passing the properties and values directly into script without using Object Repository. There are two types
1.     Static (by provide the set of properties and values directly) 

In Static Descriptive programming, we can pass the description of the object directly in script as show bleow.
Syntax:-Browser(Propertyname:=Propertyvalue).Page(propertyname:=propertyvalue).webbutton(propertyname:=propertyvalue)

2.      Dynamic (by creating description object) 

Set Desc = Description.Create() is a dynamic way.

Description Object stores the properties and values of a particular object in an instance of that object. 
For example, consider there are 3 objects Browser, Page and a Button.To develop DP, first we need to create empty description objects as shown below: 

Set ObjBrowser = Description.Create 
Set ObjPage = Description.Create 
Set ObjButton = Description.Create 

Next we need to add identification properties & values to these objects as 

ObjBrowser("name").value = "BrowserName" 
ObjPage("title").value = "PageName" 
ObjButton("name").value = "ButtonName" 

No comments:

Post a Comment