|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.safs.Processor
org.safs.ComponentFunction
org.safs.rational.CFComponent
org.safs.rational.CFTable
org.safs.rational.CFJCTable
public class CFJCTable
Purpose: CFJCTable, process a JCTable component
Lifetime: instantiated by TestStepProcessor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.safs.rational.CFTable |
|---|
CFTable.TableCell |
| Field Summary | |
|---|---|
protected int[] |
columnMap
|
protected int[] |
rowMap
|
| Fields inherited from class org.safs.ComponentFunction |
|---|
action, compName, mapname, utils, windowName |
| Constructor Summary | |
|---|---|
CFJCTable()
Purpose: constructor, calls super |
|
| Method Summary | |
|---|---|
protected void |
actionClick(GuiTestObject guiObj,
int row,
int col,
java.lang.Integer rrow2,
java.lang.Integer ccol2,
java.lang.String rowval,
java.lang.String column)
Purpose: actually do the click action, this version takes 4 coords |
protected void |
actionClick(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column)
Purpose: actually do the click action |
protected void |
actionClickColumnLabel(GuiTestObject guiObj,
int col,
int yoffset)
Purpose: ClickColumnLabel, this overrides the version in our parent |
protected void |
actionClickRowLabel(GuiTestObject guiObj,
int row,
int xoffset)
Purpose: ClickRowLabel, this overrides the version in our parent |
protected void |
actionGetCellCoordinates(GuiTestObject guiObj,
int row,
int col,
java.lang.String xCoordVariable,
java.lang.String yCoordVariable)
Purpose: GetCellCoordinates, this overrides the version in our parent |
protected void |
actionGetTableRowColumnCount(GuiTestObject guiObj,
java.lang.String rowCountVariable,
java.lang.String colCountVariable)
Purpose: GetTableRowColumnCount, this overrides the version in our parent |
protected void |
actionSelectCellTextSpecial(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column,
boolean control,
boolean shift,
boolean leftRight)
Purpose: actually do the right or left click action with Contorl or Shift key pressed. |
protected void |
actionVerify(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column,
boolean fuzzy,
java.lang.String val)
Purpose: actually do the verify action |
protected void |
actionVerifyCellEditable(GuiTestObject guiObj,
int row,
int col,
boolean verifyFlag)
Purpose: VerifyCellEditable, this overrides the version in our parent |
protected void |
actionVerifyColumnLabel(GuiTestObject guiObj,
java.lang.String val,
int col)
Purpose: VerifyColumnLabel, this overrides the version in our parent |
protected void |
actionVerifyRowLabel(GuiTestObject guiObj,
java.lang.String val,
int row)
Purpose: VerifyRowLabel, this overrides the version in our parent |
protected void |
adjustForFrozenCells(TestObject jctable)
Purpose: Refine the columnMap and rowMap variables by reordering the arrays if certain frozen rows or frozen columns are placed in the table in an abnormal way. |
protected void |
commandCaptureRangeToFile(boolean fuzzy)
Purpose: commandCaptureRangeToFile: process commands like: CaptureRangeToFile, CaptureFuzzyRangeToFile |
protected java.util.Collection |
extractCellText(TestObject jctable,
TestObject tblDataSource)
|
protected java.lang.Object |
getCell(TestObject jctable,
int row,
int col)
Purpose: get a cell based on row and col, uses 'getCells' method |
protected java.util.Collection |
getCells(TestObject jctable)
Purpose: get all cells of the testobject (JCTable) |
protected int |
getColi(boolean fuzzy,
java.lang.String column,
GuiTestObject guiObj)
Purpose: get the column number based on fuzzy match |
protected int |
getColTot(int col,
GuiTestObject jctable)
|
protected java.awt.Point |
getLocalCoords(GuiTestObject jctable,
int row,
int col)
|
protected int |
getNumRows(TestObject jctable)
Purpose: get number of rows in table |
protected int |
getRowLabelY(GuiTestObject jctable,
int row,
int y)
Purpose: getRowLabelY This method let you implement the the custom calculation to find the y position for any frozen row labels in the JCTable. |
protected int |
getRowOffset()
|
protected int |
getRowTot(int row,
GuiTestObject jctable)
|
protected void |
purgeHiddenCells(TestObject jctable)
Purpose: Refine the columnMap and rowMap variables by removing all of the hidden columns and rows from the arrays. |
protected void |
setDefaultColumnMap(TestObject jctable)
|
protected void |
setDefaultRowMap(TestObject jctable)
|
protected boolean |
setLocalSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2,
boolean left,
boolean right)
|
protected void |
setLocalSelectionSpecial(GuiTestObject jctable,
int row,
int col,
boolean control,
boolean shift,
boolean leftRight)
|
protected boolean |
setSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2)
Purpose: set selection (NOTE: currently doesn't allow edit of cell when selected, looks like this is just a highlight, rather than a selection). |
protected boolean |
setSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2,
boolean left,
boolean right)
Purpose: set selection Does a click in the cell based on the result of invoking getCellPosition on the jctable. |
protected void |
setSelectionSpecial(GuiTestObject guiObj,
int row,
int col,
boolean control,
boolean shift,
boolean leftRight)
Purpose: setSelectionSpecial Does a click in the cell based on the result of invoking getCellPosition on the jctable. |
protected void |
setTextValue(TestObject jctable,
int row,
int col,
java.lang.String text)
Purpose: set text value of cell |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] columnMap
protected int[] rowMap
| Constructor Detail |
|---|
public CFJCTable()
| Method Detail |
|---|
protected java.lang.Object getCell(TestObject jctable,
int row,
int col)
throws SAFSException
getCell in class CFTablejctable, - TestObjectrow, - intcol, - int
SAFSException - based on caught Exception, like index out of bounds, etc.
protected java.util.Collection getCells(TestObject jctable)
throws SAFSException
jctable, - TestObject
SAFSException - based on caught Exceptionprotected void purgeHiddenCells(TestObject jctable)
jctable - protected void adjustForFrozenCells(TestObject jctable)
jctable -
protected java.util.Collection extractCellText(TestObject jctable,
TestObject tblDataSource)
protected boolean setSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2)
throws SAFSException
jctable, - TestObjectrow, - intcol, - introw2, - intcol2, - int
SAFSException - based on caught Exception
protected java.awt.Point getLocalCoords(GuiTestObject jctable,
int row,
int col)
protected boolean setLocalSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2,
boolean left,
boolean right)
throws SAFSException,
com.rational.test.ft.UnsupportedActionException,
MethodNotFoundException
SAFSException
com.rational.test.ft.UnsupportedActionException
MethodNotFoundException
protected boolean setSelection(GuiTestObject jctable,
int row,
int col,
int row2,
int col2,
boolean left,
boolean right)
throws SAFSException
jctable, - TestObjectrow, - intcol, - introw2, - intcol2, - intleft, - boolean, is it a left clickright, - boolean, is it a right click
SAFSException - based on caught Exception
protected void setTextValue(TestObject jctable,
int row,
int col,
java.lang.String text)
throws SAFSException
jctable, - TestObjectrow, - intcol, - inttext, - String
SAFSException - based on caught Exception
protected void actionClick(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column)
throws SAFSException
actionClick in class CFTableguiObj, - GuiTestObjectrow, - intcol, - int
SAFSException
protected void actionClick(GuiTestObject guiObj,
int row,
int col,
java.lang.Integer rrow2,
java.lang.Integer ccol2,
java.lang.String rowval,
java.lang.String column)
throws SAFSException
actionClick in class CFTableguiObj, - GuiTestObjectrow, - intcol, - int
SAFSExceptionprotected int getRowOffset()
protected void commandCaptureRangeToFile(boolean fuzzy)
throws SAFSException
example step commands:
T, JavaWin, JTable, CaptureRangeToFile, AFileName.txt
CaptureRange entire table To File AFileName.txt
T, JavaWin, JTable, CaptureRangeToFile, AFileName.txt, 4, "Field5", 2, 5
Saves a 2 rows by 5 columns range of cells starting at cell 4, Field5.
The starting column is determined by matching the text "Field5" to the field headers
in the JTable. The values are saved into AFileName.txt
T, JavaWin, JTable, CaptureRangeToFile, AFileName.txt, "ADatum", 5, , 2
Saves a range of all remaining rows by 2 columns wide starting at cell "ADatum", 5.
The starting row is determined by matching the text "ADatum" to the first cell
in column 1 in the JTable that contains "ADatum". Since no ROWS parameter was provided,
all subsequest rows from the 2 columns are captured. The values are saved into
AFileName.txt
NOTE: if fuzzy is true then: (case is ignored; if matching columns, or
if matching cell values, use substrings)
commandCaptureRangeToFile in class CFTablefuzzy, - boolean, if true then substrings or case insensitive match
SAFSException
protected void actionGetCellCoordinates(GuiTestObject guiObj,
int row,
int col,
java.lang.String xCoordVariable,
java.lang.String yCoordVariable)
throws SAFSException
example step commands:
T, JavaWin, JCTable, GetCellCoordinates, 2, 4, xCoordVar, yCoordVar
Returns the X and Y coordinates value of row 2 and col 4 in JCTable.
actionGetCellCoordinates in class CFTableguiObj, - GuiTestObjectrow, - intcol, - intxCoordVariable, - StringyCoordVariable, - String
SAFSException
protected void actionVerifyRowLabel(GuiTestObject guiObj,
java.lang.String val,
int row)
throws SAFSException
example step commands:
T, JavaWin, JCTable, VerifyRowLabel, "BenchValue", 2
Compares the value (Frozen row label) of row 2, in JCTable to bench text "BenchValue".
actionVerifyRowLabel in class CFTableguiObj, - GuiTestObjectval, - Stringrow, - int
SAFSException
protected void actionVerifyColumnLabel(GuiTestObject guiObj,
java.lang.String val,
int col)
throws SAFSException
example step commands:
T, JavaWin, JCTable, VerifyColumnLabel, "BenchValue", 3
Compares the value (Frozen column label) of column 3, in JCTable to bench text "BenchValue".
NOTE: When you work with the column lable which consist of multiple column to find
the next column label in the table you need to add one to the number of columns
under the column label.
actionVerifyColumnLabel in class CFTableguiObj, - GuiTestObjectval, - Stringcol, - int
SAFSException
protected int getRowLabelY(GuiTestObject jctable,
int row,
int y)
jctable, - TestObjectrow, - inty, - int
protected void actionClickRowLabel(GuiTestObject guiObj,
int row,
int xoffset)
throws SAFSException
example step commands:
T, JavaWin, JCTable, ClickRowLabel, 2
Make a single click on the specified forzen row label. In this example the keyword makes
click on the second forzen row label in the JCTable.
T,windowName,TableName,doubleclickRowLabel,2
T,windowName,TableName,activateRowLabel,2
Make a double click on the specified forzen row label. In this example the keyword makes
click on the second forzen row label in the JCTable.
NOTE: This keyword is implemeted using the co-ordinates. This keyword internally calculates
the co-ordinates of any given frozen row label cell location and executes a single or double
click on that frozen row label.
actionClickRowLabel in class CFTableguiObj, - GuiTestObjectrow, - int
SAFSException
protected void actionClickColumnLabel(GuiTestObject guiObj,
int col,
int yoffset)
throws SAFSException
example step commands:
T, JavaWin, JCTable, ClickColumnLabel, 2
Make a single click on the specified forzen col label. In this example the keyword makes
click on the second forzen col label in the JCTable.
T,windowName,TableName,DoubleClickColumnLabel,2
T,windowName,TableName,ActivateColumnLabel,2
Make a double click on the specified forzen col label. In this example the keyword makes
click on the second forzen col label in the JCTable.
NOTE: This keyword is implemeted using the co-ordinates. This keyword internally calculates
the co-ordinates of any given frozen col label cell location and executes a single or
double click on that frozen col label.
actionClickColumnLabel in class CFTableguiObj, - GuiTestObjectcol, - int
SAFSException
protected void actionVerifyCellEditable(GuiTestObject guiObj,
int row,
int col,
boolean verifyFlag)
throws SAFSException
example step commands:
T, JavaWin, JCTable, VerifyCellEditable, 2,5,true
Verifies the cell in JCTable, at row = 2, col = 5 is ediable. Validates the cell property
to a known value.
actionVerifyCellEditable in class CFTableguiObj, - GuiTestObjectrow, - intcol, - intverifyFlag, - boolean
SAFSException
protected void setLocalSelectionSpecial(GuiTestObject jctable,
int row,
int col,
boolean control,
boolean shift,
boolean leftRight)
throws SAFSException,
com.rational.test.ft.UnsupportedActionException,
MethodNotFoundException
SAFSException
com.rational.test.ft.UnsupportedActionException
MethodNotFoundException
protected void setSelectionSpecial(GuiTestObject guiObj,
int row,
int col,
boolean control,
boolean shift,
boolean leftRight)
throws SAFSException,
SubitemNotFoundException
jctable, - TestObjectrow, - intcol, - introw2, - intcol2, - intleft, - boolean, is it a left clickright, - boolean, is it a right click
SAFSException - based on caught Exception
SubitemNotFoundException
protected void actionSelectCellTextSpecial(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column,
boolean control,
boolean shift,
boolean leftRight)
throws SAFSException
actionSelectCellTextSpecial in class CFTableguiObj, - GuiTestObjectrow, - intcol, - intcontrol, - booleanshift, - booleanleftRight, - boolean
SAFSException
protected void actionGetTableRowColumnCount(GuiTestObject guiObj,
java.lang.String rowCountVariable,
java.lang.String colCountVariable)
throws SAFSException
example step commands:
T, JavaWin, JCTable, GetTableRowColumnCount, rowCountVar, colCountVar
Returns the total count of rows and columns in JCTable.
actionGetTableRowColumnCount in class CFTableguiObj, - GuiTestObjectrowCountVariable, - StringcolCountVariable, - String
SAFSException
protected void actionVerify(GuiTestObject guiObj,
int row,
int col,
java.lang.String rowval,
java.lang.String column,
boolean fuzzy,
java.lang.String val)
throws SAFSException
CFTable
actionVerify in class CFTableSAFSException
protected int getColi(boolean fuzzy,
java.lang.String column,
GuiTestObject guiObj)
throws SAFSException
getColi in class CFTablefuzzy, - booleancolumn, - StringguiObj, - GuiSubitemTestObject
SAFSExceptionprotected void setDefaultColumnMap(TestObject jctable)
columnMap - protected void setDefaultRowMap(TestObject jctable)
rowMap -
protected int getNumRows(TestObject jctable)
throws SAFSException
CFTable
getNumRows in class CFTableSAFSException - based on caught Exception
protected int getColTot(int col,
GuiTestObject jctable)
protected int getRowTot(int row,
GuiTestObject jctable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||