Student Mode Code Display

Welcome to the Fraternity!

Commenting has been enabled. You can comment on all the Code Items now.

Use of Cascade Description

Add This Code to My Favourite List
Enter Email

Contributed By admin
Date 2014-12-26 02:16:08

'There are 8 tables on the page. 
'Each table have 10 similar links. Each link 
'in all the tables have same html id as "xyz_link_new". 
'That is, there are 80 links with absolutely similar
'properties. (8 Table* 10 links = 80).
'Each table also has the same html id as "xyz_table_new".
'Write a QTP script to click on 4 th link in 4th table.

'I call this double cascade Description since 
'two descriptions are to be created and one 
'description is used inside another.

Dim oTableChild,i,oChildObj,odescTable,odescLink

'Create Desc for table as all tables has
'the same description
Set odescTable = description.Create

'Create Desc for Link as all links has
'the same description
Set odescLink = description.Create
odescTable("html tag").Value = "Table"
odesctable("htmltag").value = "xyz_table_new"

odescLink("micclass").Value = "Link"
odesclink("htmltag").value = "xyz_link_new"

'Getting all the Table Child Object
Set oTableChild = browser("name:=.*").page("title:=.*").ChildObjects(odescTable)

'Getting all the link child object
'but only which are present under
'specified child table object i.e. 4
set oChildObj = oTableChild(3).ChildObjects(odescLink)

'Clickin on the 4th Link Contained in 4th Table

File Link:
download file.
it will be saved in txt format.
open the file in notepad.
Clik on save as .
Select "all files" in the drop down.
rename the file and with.html extension 
a new file will be created.
Open the File in IE to run the Code from QTP.;topic=34.0;attach=1

Download Above Code


Updated by Akash Tyagi at 2014-12-26 13:37:02
cascade description example
Updated by MichaelLiawl at 2019-07-13 15:40:16
Duly licensed by the Dubai Economic Department with offices in Dubai and Abu Dhabi, the firm provides business set-up and company formation services across UAE. Key services include selection of the correct legal form and locality based on business needs, license registration, business advisory, employee visas obtaining, bank account opening, accounting and payroll outsourcing, financial services advisory, budgeting and taxation advice, provision of secretarial and other services.

Add your comments...
Name : *      
Email : *      
The content of this field will be kept private and will not be shown publicly

Your Comment/Answer *

Enter the text present in this box : *