descriptive programming- object description - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: descriptive programming- object description (/Thread-descriptive-programming-object-description) |
descriptive programming- object description - vnicey - 11-23-2010 hi, I am new to descriptive programming and I am looking at the qtp function of one of my colleges. There are 2 buttons called Save and Cancel. In his code he has written .WebButton(CancelTop).click. But when i checked the object with the object spy, it showed different names: Its html id =btnCancel, name and value =Cancel and type = Cancel. How can you create user defined names for objects on a web page? Thanks Nicey RE: descriptive programming- object description - KavitaPriyaCR - 11-23-2010 Hi I think you will find information about descriptive programming in this forum, as it is discussed earlier. For this scenario, You can write the DP as below 'Describe button as: Code: set oCancel=Description.Create RE: descriptive programming- object description - vnicey - 11-23-2010 Thanks for the response Kavitha! I figured that using the above code a user can click the cancel buttons on a web page based on the index provided. But in the code i am reviewing, it doesn't have any object creation code anywhere in the test as well as in the associated function (vbs) files. My colleague has used the With .. End With statement within which he uses .WebButton(CancelTop).Click. Can we make use of parameters to create an object name? RE: descriptive programming- object description - Anu123 - 11-24-2010 Hi Nicey, If i understand your query properly, 1. Please look into the Object Repository of your test for Object 'CancelTop' I believe this is the logical name of the object. 2. With .. End With is used to Executes a series of statements on a single object. There is no descriptive programming used |