Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How can SilkTest deal with dynamic tables?

How can SilkTest deal with dynamic tables?

If columns have objects in them, such as links or controls, SilkTest declares each of the links and controls when you record window declarations for the column.

If your application dynamically builds tables, such that you do not know at runtime how many rows there will be and consequently do not know how many objects there will be, you should not declare individual objects in tables. You should remove their declarations from those that SilkTest creates when you declare a window.

You can use the GetRowChildren method to get a list at runtime of all children (that is, controls and objects) in a specified row of a table or column.

The way to work with your dynamic table would be to use functions like GetRowCount and GetRowChildren to return the contents of each row, and then manipulate the returned row objects e.g. GetText on a text object.

Included below is one way of dealing with dynamically generated Html Tables.

Example Code:

[ ] LIST OF ANYTYPE rowChildren
[ ] INTEGER i=0
[ ] INTEGER rowCount
[ ] window wChild
[ ]
[ ] // Find Number of Rows
[ ] rowCount=HtmlTable.GetRowCount()
[ ]
[ ] //Loop for each row in dynamic table
[-] for (i = 1; i 

Old KB# 22092


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:27
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.