HTML_GetTableElement Function

Description:

The HTML_GetTableElement function returns a HTML table cell content.

Format:

HTTP GET HOST Hostname URL url szVar = HTML_GetTableElement(options, tableIndex, cellLine, cellCol);
szVar = HTML_GetTableElement(inputHtml, tableIndex, cellLine, cellCol);

Parameters:

szVar

A string variable into which the table cell will be loaded.

options

Available options are:

CONTENT  The function is applied on the current HTTP response 

tableIndex

An integer expression containing the table index in the HTML.

cellLine

An integer expression containing the cell line number.

cellCol

An integer expression containing the cell column number.

inputHtml

A string expression containing HTML from which the function will extract the table cell.

Example:

STRING szCell;
STRING szHTML;

// Retrieve cell at line 2 and column 1 from first table in HTML page
HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" szCell = HTML_GetTableElement(content, 1, 2, 1);

HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" szHTML = GetContent();
szCell = HTML_GetTableElement(szHTML, 1, 2, 1);

// Remove blanks and log result
szCell = LTrim(szCell);
szCell = RTrim(szCell);
LOG "Cell(2,1) = " + szCell;

Output:

Cell(2,1) = <IMG SRC="images/Login_FMBanner1.gif" WIDTH=501 HEIGHT=95>

See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap