HTMLTable

These are the actions associated with the HTMLTable step type.

Description

Clicks on a specific HTMLTable cell based on the index parameter.

Parameters

Field or Control

Definition

index=I/R/C:

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3 ;

In the second example, CellClick clicks on the third column of the second row of the first table.

Description

Clicks the check box specified in the table cell location based on the index parameter.

Parameters

Field or Control

Definition

index=I/R/C:

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3;

In the second example, this function clicks on a checkbox within the third column of the second row of the first table.

chkidx=value;

The CheckBox object index inside the cell.

check=value;

check=Y – Select the checkbox.

check=N – Clear the checkbox.

This parameter is optional. The default value is Y.

Description

Clicks the image specified in the table cell location based on the index parameter.

Parameters

Field or Control

Definition

index=I/R/C

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3;

In the second example, this function clicks on an image within the third column of the second row of the first table.

alt=value

Optional parameter. The alt property value of the HTML image to click.

title=value

Optional parameter. The title property value of the HTML image to click.

Description

Clicks the link specified in the table cell location based on the index parameter.

Parameters

Field or Control

Definition

index=I/R/C:

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3;

In the second example, this function clicks on a link within the third column of the second row of the first table.

link=value;

The link text value.

Description

Determines whether a cell exists.

Parameters

Field or Control

Definition

index=I/R/C:

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3;

In the second example, this function verifies whether a cell exists within the third column of the second row of the first table.

ret=&variable

The return value.

True – the cell exists.

False – the cell does not exist.

Description

Searches the page for the text value specified in the text parameter and returns the index string for the first cell that contains the text. The index string is in the form of I/R/C, where I is the table index, R is the row number, and C is the column number. Other actions, such as CellClick, CellGetValue, and so on, use an index string to reference a specific cell.

Use the GetCellIndex button on the recorder toolbar to capture the text value and return a variable for the index.

Parameters

Field or Control

Definition

text=value;

The text to look for on the page.

index=value;

Optional. If a value is entered it is used to start the search for the text. If the value is blank, PTF will start to look for the text in the index 1/1/1.

equal=value;

equal=true performs an exact match on the text to search for. This is the default for this optional parameter.

equal=false uses a LIKE statement when performing the search.

expected=value

Optional. If used, PTF writes either a Pass or Fail for the step in the test log based on whether a matching object exists. If this parameter is not included, then only step information is logged during execution.

For example:

expected=true Logs an error when the expected value is not found; logs Passed if found, logs Failed if not found.

expected=false Logs an error when the expected value is found; logs Passed if not found, logs Failed if found.

ret=&variable

The return value is an index string in the form of I/R/C, where I is the table index, R is the row number, and C is the column number.

For example:

ret=&CellIndex

Example

This example illustrates using the CellGetIndex to return a variable for the index, then creating a variable for the html cell that is to the left of the original cell using the sum function, and then clicking that cell. In this example PTF will start to look for the text in table 7, row 1, column 1.

Type

Action

Recognition

Parameters

Value

Browser

Start_Login

Browser

FrameSet

Link

Click

id=pttabpercontent

Browser

FrameSet

PtModFrame_##

HTMLTable

CellGetIndex

text=BI Publisher

index=7/1/1;equal=true;ret=&htmlindex

Variable

Set_Value

&htmlindex

sum(&htmlindex|-1|3|”/”)

HTMLTable

CellClick

index=&htmlindex

Page

Save

Name=PORTAL_HPWRK_HTMLAREA

Description

Returns the contents of an HTMLTableCell.

Use the CellGetValue button on the recorder toolbar to capture the index value and return a variable for the value.

Parameters

Field or Control

Definition

index=I/R/C:

The table, row, column index string.

For example:

index=&CellIndex

index=1/2/3;

In the second example, this function returns the contents of the third column of the second row of the first table.

ret=&variable

The return value.

Description

Returns the number of columns for the HTMLTable row.

Parameters

Field or Control

Definition

table=value;

The table index.

row=value;

The row index.

index=I/R/C:

An index string in the form of I/R/C, where I is the table index, R is the row number, and C is the column number.

As an alternative to specifying the table and row parameters, you can specify an index string, such as the return value from a CellGetIndex action.

For example:

index=&CellIndex;

ret=&variable

The return value.

Description

Returns the number of rows for the HTMLTable.

Parameters

Field or Control

Definition

table=value;

The table index.

index=I/R/C:

An index string in the form of I/R/C, where I is the table index, R is the row number, and C is the column number.

As an alternative to specifying the table parameter, you can specify an index string, such as the return value from a CellGetIndex action.

For example:

index=&CellIndex;

ret=&variable

The return value.