Descriptive Programming: As Descriptive Programming Takes Effect It Is Recommended in The Fallowing Situations
Descriptive Programming: As Descriptive Programming Takes Effect It Is Recommended in The Fallowing Situations
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