Interface IGridBase
Base interface for Web grid test objects.
Inherited Members
Namespace: HP.LFT.SDK.Web
Assembly: HP.LFT.SDK.dll
Syntax
public interface IGridBase : IWebElement, ITestObject, IClickable, IWebTestObject, IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider, ISupportDragAndDrop
Properties
ColumnHeaders
A list of column headers.
Declaration
ReadOnlyCollection<string> ColumnHeaders { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<string> |
Rows
A list of ITableRow rows.
Declaration
ReadOnlyCollection<ITableRow> Rows { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<ITableRow> |
Methods
FindRowWithCellTextInColumn(TextMatch, ColumnToSearch)
Finds the row with the specified text in the specified column, in cases where the text or columnHeader may appear more than once. Scrolls to the found row if one exists.
Declaration
ITableRow FindRowWithCellTextInColumn(TextMatch textMatch, ColumnToSearch columnToSearch)
Parameters
| Type | Name | Description |
|---|---|---|
| TextMatch | textMatch | Description of the text we are looking for. |
| ColumnToSearch | columnToSearch | The column number or column header in which to search for the text. |
Returns
| Type | Description |
|---|---|
| ITableRow | The requested row if one exists |
Remarks
Usage example: var row = grid.FindRowWithCellTextInColumn(TextMatch.Match("Portuguese", 2), ColumnToSearch.ByHeader("Language", 1)); This example finds the 3rd occurrence of the text "Portuguese" in the 2nd column with the header "Language".
Exceptions
| Type | Condition |
|---|---|
| GeneralLeanFtException | If the requested row cannot be found or error occurs during execution. |
FindRowWithCellTextInColumn(string, string)
Finds the first row with this text in the specified column.
Declaration
ITableRow FindRowWithCellTextInColumn(string text, string columnHeader)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Text to find. |
| string | columnHeader | The column header. |
Returns
| Type | Description |
|---|---|
| ITableRow | The requested row, or null if none exists. |
FindRowWithCellTextInColumn(string, string, uint)
Finds the first row with the specified text in the specified column, starting from the specified row.
Declaration
ITableRow FindRowWithCellTextInColumn(string text, string columnHeader, uint startFromRow)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Text to find. |
| string | columnHeader | The column header. |
| uint | startFromRow | Index from which to start the search. |
Returns
| Type | Description |
|---|---|
| ITableRow | The requested row, or null if none exists. |
FindRowWithCellTextInColumn(string, uint)
Finds the first row with this text in the specified column.
Declaration
ITableRow FindRowWithCellTextInColumn(string text, uint columnNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Text to find. |
| uint | columnNumber | The column number to search. |
Returns
| Type | Description |
|---|---|
| ITableRow | The requested row, or null if none exists. |
FindRowWithCellTextInColumn(string, uint, uint)
Finds the first row with the specified text in the specified column, starting from the specified row.
Declaration
ITableRow FindRowWithCellTextInColumn(string text, uint columnNumber, uint startFromRow)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Text to find. |
| uint | columnNumber | The column number to search. |
| uint | startFromRow | Index from which to start the search. |
Returns
| Type | Description |
|---|---|
| ITableRow | The requested row, or null if none exists. |
SelectCell(uint, string)
Selects the specified cell in the grid.
Declaration
void SelectCell(uint row, string columnHeader)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | row | 0-based row number. |
| string | columnHeader | The column header. |
SelectCell(uint, uint)
Selects the specified cell in the grid.
Declaration
void SelectCell(uint row, uint column)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | row | 0-based row number. |
| uint | column | 0-based column index. |