public class SwingTable extends UiTable
Can be identified by:
log, properties| Constructor and Description |
|---|
SwingTable(UiDriver uiDriver,
UiElementProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
clickCell(int row,
int column)
Click table cell
|
void |
clickHeader(int columnIndex)
Click table header by column index
|
void |
clickHeader(String columnName)
Click table header by column name
|
void |
doubleClickCell(int row,
int column)
Double click table cell
|
void |
drag(int row,
int column)
Simulates a user dragging a cell from this table
|
void |
drop(int row,
int column)
Simulates a user dropping an item into a specific table cell
|
Color |
getCellBackgroundColor(int row,
int column)
Returns the table cell background
Color |
Color[][] |
getCellBackgroundColors()
Gets table cell backgrounds (as
Color) of all table cells. |
Color |
getCellForegroundColor(int row,
int column)
Returns the table cell foreground
Color |
List<Integer[]> |
getCellIndexesByValue(String value,
boolean isRegEx)
Get table cell coordinates by cell value
|
int |
getColumnCount()
Get table column count
|
String |
getFieldValue(int row,
int column)
Get table field value
|
int |
getRowCount()
Get table row count
|
int[] |
getSelectedRows()
Get selected rows in the table
|
void |
rightClickCell(int row,
int column)
Right click on table cell
|
void |
selectCell(int row,
int column)
Select table cell
|
void |
selectCells(int[][] cells)
Select table cells
|
void |
selectRow(int... rows)
Select table rows
|
void |
setFieldValue(String value,
int row,
int column)
Set table field value
|
void |
verifyFieldValue(String expectedValue,
int row,
int column)
Verify the field value is as specified
|
void |
verifyFieldValueRegex(String expectedValueRegex,
int row,
int column)
Verify the field value matches the specified java regular expression
|
void |
verifyNotFieldValue(String notExpectedValue,
int row,
int column)
Verify the field value is NOT as specified
|
checkTypeAndRules, getElementProperties, getElementProperty, getPropertyNamesToUseForMatch, getUiDriver, logAction, toStringpublic SwingTable(UiDriver uiDriver, UiElementProperties properties)
public void setFieldValue(String value, int row, int column)
setFieldValue in class UiTablevalue - the value to setrow - the row numbercolumn - the column numberVerificationException - if the element doesn't existpublic String getFieldValue(int row, int column)
getFieldValue in class UiTablerow - the row numbercolumn - the column numberVerificationException - if the element doesn't existpublic int getRowCount()
getRowCount in class UiTableVerificationException - if the table element doesn't existpublic int getColumnCount()
getColumnCount in class UiTableVerificationException - if the table element doesn't existpublic void verifyFieldValue(String expectedValue, int row, int column)
verifyFieldValue in class UiTableexpectedValue - row - the field row starting at 0column - the field column starting at 0VerificationException - if the element doesn't existVerifyEqualityException - if the verification failspublic void verifyNotFieldValue(String notExpectedValue, int row, int column)
verifyNotFieldValue in class UiTablenotExpectedValue - row - the field row starting at 0column - the field column starting at 0VerificationException - if the element doesn't existVerifyNotEqualityException - if the verification failspublic void verifyFieldValueRegex(String expectedValueRegex, int row, int column)
verifyFieldValueRegex in class UiTableexpectedValueRegex - a java regular expressionrow - the field row starting at 0column - the field column starting at 0VerificationException - if the element doesn't existVerifyEqualityException - if the verification failspublic void clickCell(int row,
int column)
row - the row numbercolumn - the column numberVerificationException - if the table element doesn't existpublic void doubleClickCell(int row,
int column)
row - the row numbercolumn - the column numberVerificationException - if the element doesn't existpublic void rightClickCell(int row,
int column)
row - the row numbercolumn - the column numberVerificationException - if the table element doesn't existpublic List<Integer[]> getCellIndexesByValue(String value, boolean isRegEx)
value - cell value to search forisRegEx - if the value is a regular expressionArrayList with cell coordinates(indexes) represented by arrays [ row, column ] which contains
the searched valueVerificationException - if the table element doesn't existpublic void selectCell(int row,
int column)
row - the row numbercolumn - the column numberVerificationException - if the table element doesn't existpublic void selectCells(int[][] cells)
cells - the cells coordinates (eg. new int[][]{ { 1, 1 }, { 1, 2 }, { 2, 2 } )VerificationException - if the element doesn't existpublic void selectRow(int... rows)
rows - row numbers to selectVerificationException - if the element doesn't existpublic int[] getSelectedRows()
VerificationException - if the table element doesn't existpublic void clickHeader(int columnIndex)
columnIndex - the column indexVerificationException - if the table element doesn't existpublic void clickHeader(String columnName)
columnName - the column nameVerificationException - if the table element doesn't existpublic void drag(int row,
int column)
row - the row numbercolumn - the column numberpublic void drop(int row,
int column)
row - the row numbercolumn - the column numberpublic Color getCellBackgroundColor(int row, int column)
Colorrow - the row numbercolumn - the column numberpublic Color[][] getCellBackgroundColors()
Color) of all table cells.Copyright © 2017 Axway Software. All rights reserved.