0% found this document useful (0 votes)
57 views

Descriptive Programming: As Descriptive Programming Takes Effect It Is Recommended in The Fallowing Situations

Descriptive programming involves specifying the programmatic description of test objects in the automation script itself. There are two approaches to descriptive programming: static representation, where the object's properties are defined in every statement; and dynamic representation, where empty description objects are first created and then defined with properties and values, which can then be reused in the script. Dynamic representation is recommended to avoid having to update property references if object properties change between builds.

Uploaded by

harikaparimala06
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Descriptive Programming: As Descriptive Programming Takes Effect It Is Recommended in The Fallowing Situations

Descriptive programming involves specifying the programmatic description of test objects in the automation script itself. There are two approaches to descriptive programming: static representation, where the object's properties are defined in every statement; and dynamic representation, where empty description objects are first created and then defined with properties and values, which can then be reused in the script. Dynamic representation is recommended to avoid having to update property references if object properties change between builds.

Uploaded by

harikaparimala06
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Descriptive Programming Specifying The Programmatic Description For The Test Object in the Script itself is called Descriptive

Programming. As Descriptive Programming takes Effect it is Recommended in the Fallowing situations: 1) To Speed Up the Test Execution. 2) To Handle the Objects whose Properties are Dynamically Changing. 3) To Handle Similar Objects in Application. 4) To Develop generic ( Common ) Scripts. 5) To Develop Automation Test with out Having Application . Descriptive Programming Approaches : You Can Prepare Descriptive Programming in the Fallowing 2 Ways : 1) Static Representation. 2) Dynamic Representation. Static Representation : the Description ( Properties ) of Object in Each and Every Statement is Called Static Representation. Syntax

Class Name (Prop1 Name := Prop Value , Prop2 Name := Prop Value).Method

Ex :
Dialog("text:=Login").activate Dialog("text:=Login").winedit("attached text:=Agent Name:").set "abcd" Dialog("text:=Login").winedit("attached text:=Password:").set "mercury" Dialog("text:=Login").winbutton("text:=OK").click

Note : This Approach is Not Recommended BCZ When Ever The Object Properties are Changed in Modified Build Then You Have to Update That Properties In Each and Every Statement where Ever the Object Referred. Dynamic Representation : In This Approach at First we Create Empty Descriptive Object Using Description. Create Statement , Then we Define Properties and Values Later, We Can Use This Objects Where Ever Required. 1) Creating An Empty Description Object : Dim < Obj Name > Set < Obj Name > = Description. Create 2) Defining Properties and Values : < Obj Name > (Prop1 Name).Value = Prop Value

< Obj Name > (Prop2 Name).Value = Prop Value 3) Develop Script : Class Name( < Obj Name > ).Method Ex : Dim Lg,Agn,Pwd,K Set Lg=Description.Create Lg("text").Value="Login" Set Agn=Description.Create Agn("attached text").Value="Agent Name:" Set Pwd=Description.Create Pwd("attached text").Value="Password:" Set K=Description.Create K("text").Value="OK" Dialog(Lg).activate Dialog(Lg).winedit(Agn).set "abcd" Dialog(Lg).winedit(Pwd).set "mercury" Dialog(Lg).winbutton(K).click

You might also like