Prepare for your Next Interview
This is a discussion on What is Description Object? within the QTP forums, part of the Software Testing category; Can anyone tell me what is description object...
|
|||
|
Set ODesc = Description.Create()
ODesc("miclass").value = "WebButton" Set OCollection = Browser(p).Page(b).ChildObjects(ODesc) '''here ODesc is the description Object & by the Using the OCollection u can perform validation on any of the object that u need. E.g If there are 2 Submit button one named "Submit" other named "Logout" then...... For i = 0 to OCollection.Count-1 if OCollection(i).GeROProperty("name") = "Logout" then OCollection(i).click end if Next Regards, Nawab |
|
|||
|
Re: What is Description Object?
Hi Priya85
Find this geeklink for your question,this was already discussed in forum QTP - What is Description Object?What are SetToProperty, SetRoProperty, GetToProperty scripting?What is th cheers, sridevichitthu |
|
|||
|
Re: What is Description Object?
HI friend..
Description Creates a new, empty description object in which you can add collection of properties and values in order to specify the description object in place of a test object name in a step. Syntax set PropertiesColl = Description.Create Example The following example uses the Create method to return a Properties collection object named EditDesc, and then uses the returned object to instruct QuickTest to enter the text: MyName in the first WebEdit object in the Mercury Tours page with the name UserName. set EditDesc = Description.Create() EditDesc("Name").Value = "userName" EditDesc("Index").Value = "0" Browser("Welcome: Mercury").Page("Welcome: Mercury").WebEdit(EditDesc).Set "MyName" Thanks deepasree |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Description field in Defects module | deepika.padakandla | Quality Center | 0 | 03-03-2008 04:38 AM |
| how to insert QTP to display errors and other description | suneetham | QTP | 1 | 02-15-2008 08:40 PM |
| Avoid description in viewstate | raghulvarma | ASP.NET | 3 | 01-24-2008 07:13 AM |
| Field description for recording Oracle 10g | Geek_Guest | QTP | 0 | 11-22-2007 02:42 AM |
| Unique address description | Geek_Guest | QTP | 2 | 11-21-2007 08:27 AM |