GetRowRangeText Function (HtmlTable)

Class

HtmlTable.

Action

Returns the contents of a range of rows in a table.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

llsRangeText = table.GetRowRangeText ([StartRow, EndRow, bShowSpannedCell])
Variable Description
llsRangeText The contents of a range of rows. LIST OF LIST OF STRING.
StartRow Optional: The first row in the range. Default is the first row in the table. TABLEROW.
EndRow Optional: The last row in the range. Default is the last row in the table. TABLEROW.
bShowSpannedCell Optional: For tables with cells that span rows or columns, also called "merged cells", when bShowSpannedCell is TRUE, Silk Test Classic treats all the spanned cells as if they contain the same content, and treats the table as a full matrix. It draws invisible "lines" between the cells as if they were not grouped together. bShowSpannedCell defaults to FALSE. See the description of GetRowRangeText for an example of how bShowSpannedCell works. BOOLEAN.

Notes

HTML table column headings are not considered to be table data, and therefore are not returned by GetRowRangeText(). Silk Test Classic always regards the first row as the column name, not as the first row. For example:
column name 1 column name 2 column Name 3
row 1 row 1 row 1
row 2 row 2 row 2
row 3 row 3 row 3

Calling GetRowRangeText with no arguments returns the contents of the entire table.

By default, blank cells are ignored. If you are using the DOM extension and want to return blank cells as empty strings (""), set the RowTextIncludesEmptyCells option to TRUE. You can set this option globally in the Options section of the domex.ini file or on a table-by-table basis in your script file through BrowserPage, as shown in the following code sample:
SetUserOption("RowTextIncludesEmptyCells", TRUE)

For additional information about setting RowTextIncludesEmptyCells, see User Options for Table Recognition.

Example

This example uses the table on the Online Catalog page of the GMO Web application.

	[ ] LIST OF LIST OF STRING llsText
	[ ] LIST OF STRING lsText
	[ ] llsText = CatalogPage.CatalogTable.GetRowRangeText()
	[-] for each lsText in llsText
		[ ] Print (lsText)
	[ ] 
	[ ] // Result:
	[ ] // {1000, 3 Person Dome Tent, $ 299.99, 0}
	[ ] // {1001, External Frame Backpack, $ 179.95, 0}
	[ ] // {1002, Glacier Sun Glasses, $ 67.99, 3}
	[ ] // {1003, Padded Socks, $ 19.99, 4}
	[ ] // {1004, Hiking Boots, $ 109.90, 0}
	[ ] // {1005, Back Country Shorts, $ 24.95, 0}