-
Junior Member
What is Description Object?
Can anyone tell me what is description object
-
Expert Member
Re: 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
-
Expert Member
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
-
Expert Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules