Pages

Tuesday, 3 July 2012

DESCRIPTIVE PROGRAMMING


Description Programming
-->If we specify description of the object in the program itself that can be called as Description Programming
-->Using Description Programming we can execute test script without objects in object repository
-->we can execute the test script without object repository
Advantages
Fast Execution
Easy to identify the objects
we can prepare scripts without having build
Dis-Advantages
->It takes lot of time to design test script Time consuming for test script design
To Design DP,there are two ways
1.Specifying the properties and its values directly in the script
2.Description Object
Syntax/Code
Browser("p1:=value").Page("p1:=value").object("p1:value").operation/method
p1=property

Ex:
prepare descriptive programming for "Login" Opeartion in Flight Reservation
->Systemutil.Run "C:Location of the file to open"
->Dialog("text:=Login").WinEdit("attached text:=Agent name:").set "value"
Dialog("text:=login").winedit("attached text:=Password").set "mercury"
Dialog("text:=Login).winButton("text:=OK").click
window("text:=Flight reservation").close

Description Object
to create description object ,we can follow below syntax:
syntax:set object Name=Description.create
object name("Property name").value="property value"
Ex:Description programming for fligh t application
set dia=description.create
dia("text").value="Login"
set Ana=description.cretae
Ana("text").value="agent name"
set pwd=description.create
pwd("text").value="Password"
set but=description.create
but("text").value="OK"
set wc=description.create
wc("text").value="Flight Reservation"

systemutil.run "path of exe"
dialog("dia").winedit(Ana).set="testest"
dialog("dia").winedit(pwd).set="mercury"
dialog("dia").winButton(but).click
window(wc).close

No comments:

Post a Comment