Quality Testing

Quality is delighting customers

Q1) Descriptive programing is used when objects in application are in dynamic nature. How is it possible? Pls explain with an example.


Q2) How to make QTP to identify the objects when they have same properties and values?

Views: 91

Reply to This

Replies to This Discussion

Hello Suma,


I don't know Q1 answer. Please find the Q2 answer,


You use the Object spy pointer to point to an object. The Object spy displays the selected object's hierarchy tree.



Saravanan S

1) The main Theme of descriptive programing is distinguish between in two object in application.its definate possible.......for Ex.


If we hve 2 login window with have some property like UID,PWD.But we can not identify 2nd login window then with we will used object property of login window and its value.


set name1=description create()

name1("attached text").value="UID"(name of uid)

name1("class name").value="winedit"(text box property)


set password1=description create()

password1("attached text").value="pwd"(name of pwd)

password1("class name").value="winedit"(text box property)


window("login").winedit(name1).set "test"

window("login").winedit(password1).set "mercury"


this programming will used when 1 login window still working but 2 login window not working then we will used own created login window.


2) If we identify the object with some certain matching property then we will used the INDEXING.


ex. name("index").value=1









After loging into Yahoo mail, it will be displayed as Hi,<User>. Based on the user who logged in, his/her name will be displayed here, If u want to click on the <user> link, u can use descriptive programming. 


2. If properties are same u can use Ordinal identifiers- Index,Location,Creation time


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service