I made the following code to be able to test if a column was correctly sorted.
It worked fine for columns which where visible in the view, but when the column is not visible it comes with an error.
Then i found the function actionShowTableColumn on the tabletester. From the description it should do exactly what i was looking for, but when i execute the code, a line "offset to large(870)" is written in the console.
- Code: Select all
TableTester tt = new TableTester();
TableColumn [] cols = tt.getColumns(table);
int nofCols = cols.length;
ItemTester it = new ItemTester();
for (int x=0 ; x < nofCols ; x++) {
String text = it.getText(cols[x]);
if (text.equals(headerName)){
tt.actionShowTableColumn(table, cols[x]);
tt.actionClickTableColumnHeader(table, cols[x]);
break;
}
}
Am i doing something wrong?