how to write the descriptive programming in QTP for
loginwindow.without using Step generator,object repository
for referecnes

Answer Posted / shyam.meghansh

how to write the descriptive programming in QTP for
loginwindow.without using Step generator,object repository
for referecnes



V can write Descriptive program in two different ways

Type 1:

SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"

Dialog("Text:=Login").WinEdit("Attached text:=Agent
Name:").set "shyam"
Dialog("Text:=Login").WinEdit("Attached
text:=Password:").set "mercury"
Dialog("Text:=Login").WinButton("text:=OK").click



Type 2:

SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"

Set login=Description.Create()
login("text").value="login"

Set agentname=Description.Create()
agentname("Attached text").value="Agent Name:"

Set password=description.Create()
password("Attached text").value="Password:"

Set ok=Description.Create()
ok("text").value="OK"

Dialog(login).winedit(agentname).set "shyam"
Dialog(login).winedit(password).set "mercury"
dialog(login).winbutton(ok).click



If any other questions mail me

testingwithshyam@gmail.com

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you write a script to check if the folder exists or not?

746


what is error and fault in terms of software quality?

1688


how can i call function (which has link with excell sheet at a remote location) within another function

1793


What test cases can you automate using QTP?

870


What is the use of text output value in quicktest professional (qtp)?

819


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?

1670


1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?

1887


How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?

3300


how to test Web application using QTP software

1545


How to use output values in qtp ?

749


What is the difference between run time object and test object?

806


write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading

1695


What is difference between run time object and test object?

785


How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..

1963


How does quicktest professional identifies the object in the application?

775