Package com.hp.lft.sdk.web
Interface GridBase<T extends TableRowBase>
- Type Parameters:
T
- the specified table row.
- All Superinterfaces:
Clickable
,LocationInfoProvider
,SupportDragAndDrop
,SupportsNativeObject
,TestObject
,TestObjectDescriber
,VisibleProvider
,WaitUntilVisibleProvider
,WebElement
,WebTestObject
,WebTestObjectDescriber
Base interface for Web grid test objects.
-
Method Summary
Modifier and TypeMethodDescriptionfindRowWithCellTextInColumn
(TextMatch textMatch, ColumnToSearch columnToSearch) Finds the row with the specified text in the specified column, in cases where the text or columnHeader may appear more than once.findRowWithCellTextInColumn
(String text, int columnNumber) Finds the first row with the specified text in the specified column.findRowWithCellTextInColumn
(String text, int columnNumber, int startFromRow) Finds the first row with the specified text in the specified column, starting from the specified row.findRowWithCellTextInColumn
(String text, String columnHeader) Finds the first row with the specified text in the specified column.findRowWithCellTextInColumn
(String text, String columnHeader, int startFromRow) Finds the first row with the specified text in the specified column, starting from the specified row.Returns the headers of the columns, usually this is the text of the first row.getRows()
Returns a collection of rows.void
selectCell
(int row, int column) Selects the specified cell in the grid.void
selectCell
(int row, String columnHeader) Selects the specified cell in the grid.Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider
getAbsoluteLocation, getLocation, getSize
Methods inherited from interface com.hp.lft.sdk.SupportDragAndDrop
dragAndDropOn, dragAndDropOn
Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject
getNativeObject
Methods inherited from interface com.hp.lft.sdk.TestObject
callFTMethod, callFTMethod, exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists
Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber
describe
Methods inherited from interface com.hp.lft.sdk.WaitUntilVisibleProvider
waitUntilVisible, waitUntilVisible
Methods inherited from interface com.hp.lft.sdk.web.WebElement
doubleClick, doubleClick, fireEvent, getAccessibilityName, getCSSSelector, getRole, getXPath, hoverTap, hoverTap, longPress, longPress, pan, pan, pinch, pinch, swipe, swipe
Methods inherited from interface com.hp.lft.sdk.web.WebTestObject
getAttribute, getAttributes, getClassName, getComputedStyle, getComputedStyles, getId, getInnerHTML, getInnerText, getName, getOuterHTML, getOuterText, getTagName, getTitle, isVisible
Methods inherited from interface com.hp.lft.sdk.web.WebTestObjectDescriber
describe, describe
-
Method Details
-
getColumnHeaders
Returns the headers of the columns, usually this is the text of the first row.- Returns:
- the headers of the columns, usually this is the text of the first row.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getRows
Returns a collection of rows.- Returns:
- a collection of rows.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
selectCell
Selects the specified cell in the grid.- Parameters:
row
- 0-based row indexcolumn
- 0-based column index- Throws:
GeneralLeanFtException
- if error occurs during execution
-
selectCell
Selects the specified cell in the grid.- Parameters:
row
- 0-based row indexcolumnHeader
- the column caption- Throws:
GeneralLeanFtException
- if error occurs during execution
-
findRowWithCellTextInColumn
Finds the first row with the specified text in the specified column.- Parameters:
text
- the text to find.columnNumber
- the column number to search.- Returns:
- the requested row or null if non exists.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
findRowWithCellTextInColumn
Finds the first row with the specified text in the specified column.- Parameters:
text
- the text to find.columnHeader
- the column caption.- Returns:
- the requested row or null if none exists.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
findRowWithCellTextInColumn
T findRowWithCellTextInColumn(String text, int columnNumber, int startFromRow) throws GeneralLeanFtException Finds the first row with the specified text in the specified column, starting from the specified row.- Parameters:
text
- text to find.columnNumber
- the column number to search.startFromRow
- index from which to start the search.- Returns:
- the requested row, or null if none exists.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
findRowWithCellTextInColumn
T findRowWithCellTextInColumn(String text, String columnHeader, int startFromRow) throws GeneralLeanFtException Finds the first row with the specified text in the specified column, starting from the specified row.- Parameters:
text
- text to find.columnHeader
- the column caption.startFromRow
- index from which to start the search.- Returns:
- the requested row, or null if none exists.
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
findRowWithCellTextInColumn
T findRowWithCellTextInColumn(TextMatch textMatch, ColumnToSearch columnToSearch) throws GeneralLeanFtException 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.
Usage example: TableRow 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".- Parameters:
textMatch
- description of the text we are looking forcolumnToSearch
- the column number or column header in which to search for the text.- Returns:
- the requested row if one exists.
- Throws:
GeneralLeanFtException
- if the requested row cannot be found or error occurs during execution
-