org.safs.rational
Class CFTable

java.lang.Object
  extended by org.safs.Processor
      extended by org.safs.ComponentFunction
          extended by org.safs.rational.CFComponent
              extended by org.safs.rational.CFTable
Direct Known Subclasses:
CFDotnetTable, CFFlexTable, CFHtmlTable, CFJCTable, CFJCTreeTable

public class CFTable
extends CFComponent


Purpose: CFTable, process a Table component
Lifetime: instantiated by TestStepProcessor

Since:
JUN 18, 2003
JUL 14, 2003 (DBauman) Original Release
JAN 07, 2004 (BNat) Added New Keyword GETCELLCOORDINATES
JAN 19, 2004 (BNat) Added New Keywords VERIFYROWLABEL,VERIFYCOLUMNLABEL
FEB 04, 2004 (BNat) Added New Keywords CLICKROWLABEL, DOUBLECLICKROWLABEL, ACTIVATEROWLABEL CLICKCOLUMNLABEL, DOUBLECLICKCOLUMNLABEL, ACTIVATECOLUMNLABEL.
FEB 06, 2004 (BNat) Added New Keyword VERIFYCELLEDITABLE
FEB 09, 2004 (BNat) Added New Keyword SELECTCELLTEXTSPECIAL
FEB 10, 2004 (BNat) Added New Keyword GETTABLEROWCOLUMNCOUNT
AUG 30, 2004 (CANAGL) VerifyCellTextContains fixed to be case-insensitive
DEC 09, 2004 (DBauman) now implement VerifyColumnLabel
DEC 16, 2004 (DBauman) now implement ClickColumnLabel,DoubleClickColumnLabel, ActivateColumnLabel,
DEC 16, 2004 (DBauman) now implement VerifyCellEditable, except it doesn't work for JTable (does work for a custom extending table)
OCT 17, 2005 (CANAGL) Changed Click variants to ClickCell variants.
OCT 28, 2005 (CANAGL) performClick extended to support Row=N;Col=N syntax for CFComponent
FEB 08, 2006 (CANAGL) fixed getCellText to work with tables containing String primitives.
FEB 12, 2006 (CANAGL) fixed actionVerify for HTMLTables. getModel method does NOT apply!
APR 09, 2008 (LeiWang) Reorder keyword constant alphabetically; Change script to Script when calling static method of Script; Use "triple click" to imitate "SELECT action", SELECTCELL SELECTCELLCONTAINSTEXTFIND SELECTCELLTEXTFIND SELECTCELLTEXT SELECTFUZZYCELLTEXT SELECTFUZZYCELLTEXTFIND
APR 11, 2008 (LeiWang) Added keyword ASSIGNCELLCONTAINSTEXTROW and ASSIGNCELLTEXTROW
AUG 05, 2008 (CANAGL) Modified to use normal cell click for "SELECT" actions
SEP 09, 2008 (LeiWang) Modified method actionAssign(): if cell text is null, return "" instead of considering the action is fail. See defect S0532491. Modified method getCellText(TestObject,TestObject,int,int): if table cell contains a java.util.Date object, it will be return as an object of com.rational.test.ft.value.DateWrapper, but this object can not give the proper string displayed in the table. So use java swing TableCellRendererComponent to get the text firstly, if this fail then use the RFT DateWrapper to get the cell text. See defect S0532493. Modify method getRowi(), use getCellText() to get cell's text. see defect S0532491.

Nested Class Summary
 class CFTable.TableCell
           
 
Field Summary
static java.lang.String ACTIVATECELL
           
static java.lang.String ACTIVATECOLUMNLABEL
           
static java.lang.String ACTIVATEROWLABEL
           
static java.lang.String ASSIGNCELLCONTAINSTEXTROW
           
static java.lang.String ASSIGNCELLTEXTROW
           
static java.lang.String ASSIGNVARIABLECELLTEXT
           
static java.lang.String ASSIGNVARIABLEFUZZYCELLTEXT
           
static java.lang.String CAPTUREFUZZYRANGETOFILE
           
static java.lang.String CAPTURERANGETOFILE
           
static java.lang.String CLICKCELL
           
static java.lang.String CLICKCELLOFCOLWITHROWVALUES
           
static java.lang.String CLICKCOLUMNLABEL
           
static java.lang.String CLICKROWLABEL
           
protected  java.lang.String[] customCellObjects
           
static java.lang.String DOUBLECLICKCELL
           
static java.lang.String DOUBLECLICKCELLOFCOLWITHROWVALUES
           
static java.lang.String DOUBLECLICKCOLUMNLABEL
           
static java.lang.String DOUBLECLICKROWLABEL
           
static java.lang.String GETCELLCOORDINATES
           
static java.lang.String GETTABLEROWCOLUMNCOUNT
           
static java.lang.String RFTGENERALVALUEPACKAGENAME
           
static java.lang.String RIGHTCLICKCELL
           
static java.lang.String SELECTCELL
           
static java.lang.String SELECTCELLCONTAINSTEXTFIND
           
static java.lang.String SELECTCELLTEXT
           
static java.lang.String SELECTCELLTEXTFIND
           
static java.lang.String SELECTCELLTEXTSPECIAL
           
static java.lang.String SELECTFUZZYCELLTEXT
           
static java.lang.String SELECTFUZZYCELLTEXTFIND
           
static java.lang.String SELECTROWWITHROWVALUES
           
static java.lang.String VERIFYCELLEDITABLE
           
static java.lang.String VERIFYCELLTEXT
           
static java.lang.String VERIFYCELLTEXTCONTAINS
           
static java.lang.String VERIFYCELLTEXTFIND
           
static java.lang.String VERIFYCOLUMNLABEL
           
static java.lang.String VERIFYFUZZYCELLTEXT
           
static java.lang.String VERIFYFUZZYCELLTEXTCONTAINS
           
static java.lang.String VERIFYFUZZYCELLTEXTFIND
           
static java.lang.String VERIFYROWLABEL
           
 
Fields inherited from class org.safs.rational.CFComponent
ASSIGNPROPERTYVARIABLE, CAPTUREOBJECTDATATOFILE, CAPTUREPROPERTIESTOFILE, CAPTUREPROPERTYTOFILE, CLEARAPPMAPCACHE, CLICK, CLOSEWINDOW, COMPONENTCLICK, CTRLCLICK, CTRLRIGHTCLICK, DOUBLECLICK, GETGUIIMAGE, GUIDOESEXIST, GUIDOESNOTEXIST, HOVERMOUSE, HSCROLLTO, INPUTCHARACTERS, INPUTKEYS, LEFTDRAG, MAXIMIZE, MINIMIZE, obj1, RESTORE, RIGHTCLICK, RIGHTDRAG, script, SELECTMENUITEM, SELECTMENUITEMCONTAINS, SETPOSITION, SETPROPERTYVALUE, SHIFTCLICK, VERIFYARRAYPROPERTYTOFILE, VERIFYBINARYFILETOFILE, VERIFYCLIPBOARDTOFILE, VERIFYFILETOFILE, VERIFYGUIIMAGETOFILE, VERIFYMENUITEM, VERIFYMENUITEMCONTAINS, VERIFYOBJECTDATATOFILE, VERIFYPROPERTY, VERIFYPROPERTYCONTAINS, VERIFYPROPERTYTOFILE, VERIFYTEXTFILETOFILE, VERIFYVALUECONTAINS, VERIFYVALUEEQUALS, VERIFYVALUES, VERIFYVALUESIGNORECASE, VSCROLLTO, WAITFORGUI, WIN_MAXIMIZED, WIN_MINIMIZED, WIN_NORMAL
 
Fields inherited from class org.safs.ComponentFunction
action, compName, mapname, utils, windowName
 
Fields inherited from class org.safs.Processor
breakpointsOn, CASE_INSENSITIVE_FLAG, CASEINSENSITIVE_FLAG, clearProxiesAlways, commandLineBreakpoint, customStr, customText, DEBUG_MESSAGE, debugStr, debugText, DEFAULT_CUSTOM_PROCESSOR_PACKAGE, DEFAULT_CUSTOM_PROCESSOR_SUBPACKAGE, DEFAULT_PROCESSOR_PACKAGE, FAILED_MESSAGE, FAILED_OK_MESSAGE, failedStr, failedText, FAILURE_DETAIL, GENERIC_MESSAGE, genericStr, genericText, LINE_FAILURE_4, log, myBreakpointsOn, otherStr, otherText, PARAM_SIZE_1, PARAM_SIZE_2, PARAM_SIZE_3, PARAM_SIZE_4, params, PASSED_MESSAGE, passedStr, passedText, PRE_TXT_SUCCESS_4, PRE_TXT_SUCCESS_5, processorConfigSet, processorMap, recordProcessed, RECTYPE_DRIVER_COMMAND, RECTYPE_DRIVER_COMMAND_F, RECTYPE_DRIVER_COMMAND_W, RECTYPE_TEST_STEP, RECTYPE_TEST_STEP_F, RECTYPE_TEST_STEP_W, SAFS_CLEARPROXIESALWAYS_ITEM, SAFS_COMMANDLINEBREAKPOINT_ITEM, SAFS_COMMANDLINEBREAKPOINT_VARIABLE, SAFS_PARAMS_FILE, SAFS_RESBUN_NAME, SAFS_SECSWAITFORCOMPONENT_ITEM, SAFS_SECSWAITFORCOMPONENT_VARIABLE, SAFS_SECSWAITFORWINDOW_ITEM, SAFS_SECSWAITFORWINDOW_VARIABLE, SAFS_TESTDOMAINS_ITEM, SAFS_TESTDOMAINS_VARIABLE, secsWaitForComponent, secsWaitForWindow, SENT_MSG_3, testDomains, testRecordData, TXT_FAILURE_1, TXT_FAILURE_2, TXT_FAILURE_3, TXT_FAILURE_4, TXT_FAILURE_5, TXT_SUCCESS_1, TXT_SUCCESS_2, TXT_SUCCESS_2a, TXT_SUCCESS_3, TXT_SUCCESS_4, TXT_SUCCESS_5, WARNING_MESSAGE, WARNING_OK_MESSAGE, warningStr, warningText
 
Constructor Summary
CFTable()
          
Purpose: constructor, calls super
 
Method Summary
protected  void actionAssign(GuiTestObject guiObj, int row, int col, java.lang.String rowval, java.lang.String column, java.lang.String var)
          
Purpose: actually do the assign action
protected  void actionCaptureRangeToFile(GuiTestObject guiObj, java.lang.Integer rrow, java.lang.Integer rrows, java.lang.String rowval, java.lang.Integer ccol, java.lang.Integer ccols, java.lang.String column, java.lang.String filename, boolean fuzzy)
          
Purpose: actually do the capture action
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)
          Perform a click action (this version takes 4 params), not implemented for CFTable, just reverts to the other version...
protected  void actionClick(GuiTestObject guiObj, int row, int col, java.lang.String rowval, java.lang.String column)
          Perform a click-variant action on a cell in a table.
protected  void actionClickColumnLabel(GuiTestObject guiObj, int col, int yoffset)
          
Purpose: ClickColumnLabel,DoubleClickColumnLabel, ActivateColumnLabel
protected  void actionClickRowLabel(GuiTestObject guiObj, int row, int xoffset)
          
Purpose: ClickRowLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class
protected  void actionGetCellCoordinates(GuiTestObject guiObj, int row, int col, java.lang.String xCoordVariable, java.lang.String yCoordVariable)
          
Purpose: GetCellCoordinates, *NOTE* currently not implemented, but will be implemented by classes that extend this class
protected  void actionGetTableRowColumnCount(GuiTestObject guiObj, java.lang.String rowCountVariable, java.lang.String colCountVariable)
          
Purpose: GetTableRowColumnCount *NOTE* currently not implemented, but will be implemented by classes that extend this class
protected  void actionLocalSelectCellTextSpecial(GuiTestObject guiObj, int row, int col, java.lang.String rowval, java.lang.String column, boolean control, boolean shift, boolean leftRight)
           
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
protected  void actionVerifyColumnLabel(GuiTestObject guiObj, java.lang.String val, int col)
          
Purpose: VerifyColLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class
protected  void actionVerifyRowLabel(GuiTestObject guiObj, java.lang.String val, int row)
          
Purpose: VerifyRowLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class
protected  java.util.List captureObjectData(TestObject table)
          Captures the object data into a List of rows.
protected  void commandAssignCellTextRow(boolean fuzzy)
          
Purpose: commandAssignCellTextRow:
Assign the "found row number" to a staf variable.
protected  void commandAssignVariableCellText(boolean fuzzy)
          
Purpose: commandAssignVariableCellText: process commands like: assignvariablecelltext
protected  void commandCaptureRangeToFile(boolean fuzzy)
          process commands like CaptureRangeToFile, CaptureFuzzyRangeToFile NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)
protected  void commandClick(boolean fuzzy)
          Process commands like: clickcell, doubleclickcell, activatecell Example:custTableTable().click(atCell(atRow(rowIndex), atColumn(colIndex)));
first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric
protected  void commandClickCellOfColWithRowValues()
          
Purpose: commandClickCellOfColWithRowValues: process commands like: clickCellOfColWithRowValues, doubleclickCellOfColWithRowValues Example:custTableTable().click(atCell(atColumn("PHONE"), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End"))); // with no coords Example:custTableTable().click(atCell(atColumn("PHONE"), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End")), atPoint(4,5)); // with coords
example step commands:
T,Frame,custTableTable,clickCellOfColWithRowValues,,PHONE,CUSTID,5,NAME,Susan Flontly,STREET,750 Central Expy
T,Frame,orderTableTable,clickCellOfColWithRowValues,,QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
T,Frame,orderTableTable,clickCellOfColWithRowValues,44;15,QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
T,Frame,orderTableTable,clickCellOfColWithRowValues,"Coords=44;15",QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
first param is cell pixel xoffset and yoffset
second param is the column name, remaining params are the name/value pairs for the row specification for the cell
protected  void commandClickColumnLabel()
          
Purpose: commandClickColumnLabel: process commands like: click, doubleclick, activate
T,windowName,TableName,clickColumnLabel,2
T,windowName,TableName,doubleclickColumnLabel,2
T,windowName,TableName,activateColumnLabel,2
protected  void commandClickFind(boolean fuzzy)
          
Purpose: commandClickFind: process commands like: click, doubleclick, activatecell
example step commands:
T,Frame,custTableTable,selectCellTextFind,rowIndexVar,3, FindCol1, FindVal1, FindCol2, FindVal2
T,Frame,orderTableTable,selectCellTextFind,rowIndexVar,PHONE NUM, FindCol1, FindVal1, FindCol2, FindVal2,FindCol3,FindVal3
second param is the column name/num to select, the rest of the params go in pairs, first a findColumn, then a findValue.
protected  void commandClickRowLabel()
          
Purpose: commandClickRowLabel: process commands like: click, doubleclick, activate
T,windowName,TableName,clickRowLabel,2
T,windowName,TableName,doubleclickRowLabel,2
T,windowName,TableName,activateRowLabel,2
protected  void commandGetCellCoordinates()
           
protected  void commandGetTableRowColumnCount()
          
Purpose: commandGetTableRowColumnCount
T,windowName,TableName,GetTableRowColumnCount,retRowCountVar, retColCountVar
protected  void commandSelectCellTextSpecial(boolean fuzzy)
          
Purpose: commandSelectCellTextSpecial: process command click, with Contorl or shirt key and left or right mouse button.
protected  void commandSelectRowWithRowValues()
          
Purpose: commandSelectRowWithRowValues: process commands like: selectRowWithRowValues Example:custTableTable().setState(Action.select(), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End"));
example step commands:
T,Frame,custTableTable,select,CUSTID,5,NAME,Susan Flontly,STREET,750 Central Expy
T,Frame,orderTableTable,select,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
all of the params are the name/value pairs for the row specification for the row to select
protected  void commandVerifyCellEditable()
          
Purpose: commandVerifyCellEditable:
T,windowName,TableName,VerifyCellEditable,2,4,true or false
T,windowName,TableName,VerifyCellEditable,2,Field4, true or false
protected  void commandVerifyCellText(boolean fuzzy)
          
Purpose: commandVerifyCellText: process commands like: verifyCellText and verifyCellTextContains
protected  void commandVerifyCellTextFind(boolean fuzzy)
          
Purpose: commandVerifyCellTextFind: process commands like: verifyCellTextFind
protected  void commandVerifyColumnLabel()
           
protected  void commandVerifyRowLabel()
           
 java.awt.Point convertCoords(java.lang.String coords)
          Overrides the version in superclass ComponentFunctions to allow for alternative of "Row=1;Col=1" or "Col = 1;Row = 1".
protected  void doActionClick(GuiSubitemTestObject guiObj, int row, int col, java.lang.String rowval, java.lang.String colval)
          Attempt to perform a click-type action on a cell and issue a success message if successful.
 java.lang.String formatObjectData(java.util.List list)
          Format the List data into a single String.
protected  Cell getCell(int row, int col)
          
Purpose: get a Cell based on row and col
protected  java.lang.Object getCell(TestObject jctable, int row, int col)
          
Purpose: get a cell based on row and col
protected  java.lang.String getCellText(TestObject guiObj, int row, int col)
          Note:
Get the text value of the cell at (row,col) in Java table
Its subclass may override this method.
protected  java.lang.String[] getCellText(TestObject guiObj, TestObject tblModel, int row, int col)
          Returns String[] String[0] = cell text value; String[1] = cell column name
protected  int getColi(boolean fuzzy, java.lang.String column, GuiTestObject guiObj)
          
Purpose: get the column number based on fuzzy match
protected  java.lang.String getColumnName(TestObject guiObj, int col)
          Retrieve the column name for the provided zero-based column number.
protected  TestObject getJCTable(TestObject jctable)
          drill down through wrapper objects to get the table
Assumptions: to be used by sub-classes.
protected  java.awt.Rectangle getLocalRect(GuiTestObject jctable, int row, int col)
          
Purpose: getLocalRect get a rectangle based on row and col indicating the offset
protected  int getNumColumns(TestObject jctable)
          
Purpose: get number of columns in table
protected  int getNumRows(TestObject jctable)
          
Purpose: get number of rows in table
protected  java.util.List getObjectData(GuiTestObject table, java.lang.Integer rrow, java.lang.Integer rrows, java.lang.String rowval, java.lang.Integer ccol, java.lang.Integer ccols, java.lang.String column, boolean fuzzy)
          Captures the object data into a Tab delimited List of values.
protected  GuiTestObject getRealTable(java.lang.Object table)
          Attempts to cast the generic Object to a GuiTestObject.
protected  int getRowi(boolean fuzzy, java.util.Collection rowvalsParam, GuiTestObject guiObj)
          
Purpose: get the row number based on fuzzy match
protected  java.lang.String getTableCellSubItemText(TestObject guiObj, int row, int col)
           
 java.lang.String getTextProperty()
           
protected  boolean isCustomCellObject(java.lang.String testObjectClass)
           
protected  void localProcess()
          
Purpose: process: process the testRecordData *
This is our specific version.
protected  void performClick(java.lang.Object point)
          Overrides CFComponent performClick to intercept TableCell specs.
protected  java.lang.String processCustomCellObject(TestObject tblModelValue)
           
protected  void selectCellText(boolean fuzzy)
          Example:custTableTable().click(atCell(atRow(rowIndex), atColumn(colIndex))); first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric the row could be the value of a cell in col #1.
 
Methods inherited from class org.safs.rational.CFComponent
captureObjectDataToFile, checkForCoord, checkForCoord, componentClick, convertObjectValueToString, extractTreeItemsSub, findMenuBars, getAppletsBrowser, getComponentRectangle, getHelpers, getObjectProperty, getObjectPropertyFromProperties, getUserObject, isDotnetDomain, isFlexDomain, isHtmlDomain, isJavaDomain, isSwtDomain, isSWTWidget, isWinDomain, listAllProperties, listAllProperties, listMethods, listNonValueProperties, listProperties, matchedPathOfMenuItem, parseWhereInfo, preformDrag, process, selectMenuItem, setPosition, tobj, verifyMenuItem
 
Methods inherited from class org.safs.ComponentFunction
action_getGuiImage, action_verifyGuiImageToFile, componentExecutedFailureMessage, componentFailureMessage, componentSuccessMessage, convertNum, getAlternateParams, getHelpersWorker, issueActionFailure, issueActionOnXFailure, issueErrorPerformingAction, issueErrorPerformingActionOnX, issueFileErrorFailure, issueInputRecordFailure, issueParameterCountFailure, issueParameterCountFailure, issueParameterValueFailure, issuePassedSuccess, issuePassedSuccessUsing, issueUnknownErrorFailure, isSupportedRecordType, lookupAppMapCoordReference, lookupAppMapNumReference, lookupAppMapReference, updateFromTestRecordData
 
Methods inherited from class org.safs.Processor
activateBreakpoint, checkBreakpoints, checkMyBreakpoints, delay, distributeConfigInformation, getAppMapItem, getChainedProcessor, getClassInstance, getClearProxiesAlways, getCustomProcClassNames, getCustomProcInstancePath, getLogUtilities, getParams, getProcClassNames, getProcInstance, getProcInstancePath, getRequiredField, getSecsWaitForComponent, getSecsWaitForWindow, getStandardErrorMessage, getTestRecordData, getVariable, hasChainedProcessor, initProcessorAndProcess, instanceProcessorAndProcess, isBreakpointsOn, isComponentFunctionRecord, isDriverCommandRecord, isEngineCommandRecord, isMyBreakpointsOn, isRecordProcessed, paramsFailedMsg, paramsFailedMsg, processCustomProcessor, processSubclassProcessor, setBreakpointsOn, setChainedProcessor, setClearProxiesAlways, setCommandLineBreakpoint, setCustomProcInstancePath, setLogUtilities, setMyBreakpointsOn, setParams, setProcInstance, setProcInstancePath, setRecordProcessed, setSecsWaitForComponent, setSecsWaitForWindow, setTestDomains, setTestRecordData, setVariable, standardFailureMessage, substituteVariable, validateParamSize, validProcessorClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVATECELL

public static final java.lang.String ACTIVATECELL
See Also:
Constant Field Values

ASSIGNCELLCONTAINSTEXTROW

public static final java.lang.String ASSIGNCELLCONTAINSTEXTROW
See Also:
Constant Field Values

ASSIGNCELLTEXTROW

public static final java.lang.String ASSIGNCELLTEXTROW
See Also:
Constant Field Values

ACTIVATECOLUMNLABEL

public static final java.lang.String ACTIVATECOLUMNLABEL
See Also:
Constant Field Values

ACTIVATEROWLABEL

public static final java.lang.String ACTIVATEROWLABEL
See Also:
Constant Field Values

ASSIGNVARIABLECELLTEXT

public static final java.lang.String ASSIGNVARIABLECELLTEXT
See Also:
Constant Field Values

ASSIGNVARIABLEFUZZYCELLTEXT

public static final java.lang.String ASSIGNVARIABLEFUZZYCELLTEXT
See Also:
Constant Field Values

CAPTURERANGETOFILE

public static final java.lang.String CAPTURERANGETOFILE
See Also:
Constant Field Values

CAPTUREFUZZYRANGETOFILE

public static final java.lang.String CAPTUREFUZZYRANGETOFILE
See Also:
Constant Field Values

CLICKCELL

public static final java.lang.String CLICKCELL
See Also:
Constant Field Values

CLICKCELLOFCOLWITHROWVALUES

public static final java.lang.String CLICKCELLOFCOLWITHROWVALUES
See Also:
Constant Field Values

CLICKCOLUMNLABEL

public static final java.lang.String CLICKCOLUMNLABEL
See Also:
Constant Field Values

CLICKROWLABEL

public static final java.lang.String CLICKROWLABEL
See Also:
Constant Field Values

DOUBLECLICKCELLOFCOLWITHROWVALUES

public static final java.lang.String DOUBLECLICKCELLOFCOLWITHROWVALUES
See Also:
Constant Field Values

DOUBLECLICKCELL

public static final java.lang.String DOUBLECLICKCELL
See Also:
Constant Field Values

DOUBLECLICKCOLUMNLABEL

public static final java.lang.String DOUBLECLICKCOLUMNLABEL
See Also:
Constant Field Values

DOUBLECLICKROWLABEL

public static final java.lang.String DOUBLECLICKROWLABEL
See Also:
Constant Field Values

GETCELLCOORDINATES

public static final java.lang.String GETCELLCOORDINATES
See Also:
Constant Field Values

GETTABLEROWCOLUMNCOUNT

public static final java.lang.String GETTABLEROWCOLUMNCOUNT
See Also:
Constant Field Values

RIGHTCLICKCELL

public static final java.lang.String RIGHTCLICKCELL
See Also:
Constant Field Values

SELECTCELL

public static final java.lang.String SELECTCELL
See Also:
Constant Field Values

SELECTCELLCONTAINSTEXTFIND

public static final java.lang.String SELECTCELLCONTAINSTEXTFIND
See Also:
Constant Field Values

SELECTCELLTEXTFIND

public static final java.lang.String SELECTCELLTEXTFIND
See Also:
Constant Field Values

SELECTCELLTEXT

public static final java.lang.String SELECTCELLTEXT
See Also:
Constant Field Values

SELECTCELLTEXTSPECIAL

public static final java.lang.String SELECTCELLTEXTSPECIAL
See Also:
Constant Field Values

SELECTFUZZYCELLTEXT

public static final java.lang.String SELECTFUZZYCELLTEXT
See Also:
Constant Field Values

SELECTFUZZYCELLTEXTFIND

public static final java.lang.String SELECTFUZZYCELLTEXTFIND
See Also:
Constant Field Values

SELECTROWWITHROWVALUES

public static final java.lang.String SELECTROWWITHROWVALUES
See Also:
Constant Field Values

VERIFYCELLEDITABLE

public static final java.lang.String VERIFYCELLEDITABLE
See Also:
Constant Field Values

VERIFYCELLTEXT

public static final java.lang.String VERIFYCELLTEXT
See Also:
Constant Field Values

VERIFYCELLTEXTFIND

public static final java.lang.String VERIFYCELLTEXTFIND
See Also:
Constant Field Values

VERIFYCELLTEXTCONTAINS

public static final java.lang.String VERIFYCELLTEXTCONTAINS
See Also:
Constant Field Values

VERIFYCOLUMNLABEL

public static final java.lang.String VERIFYCOLUMNLABEL
See Also:
Constant Field Values

VERIFYFUZZYCELLTEXT

public static final java.lang.String VERIFYFUZZYCELLTEXT
See Also:
Constant Field Values

VERIFYFUZZYCELLTEXTCONTAINS

public static final java.lang.String VERIFYFUZZYCELLTEXTCONTAINS
See Also:
Constant Field Values

VERIFYFUZZYCELLTEXTFIND

public static final java.lang.String VERIFYFUZZYCELLTEXTFIND
See Also:
Constant Field Values

VERIFYROWLABEL

public static final java.lang.String VERIFYROWLABEL
See Also:
Constant Field Values

RFTGENERALVALUEPACKAGENAME

public static final java.lang.String RFTGENERALVALUEPACKAGENAME
See Also:
Constant Field Values

customCellObjects

protected java.lang.String[] customCellObjects
Constructor Detail

CFTable

public CFTable()

Purpose: constructor, calls super

Method Detail

getTextProperty

public java.lang.String getTextProperty()

localProcess

protected void localProcess()

Purpose: process: process the testRecordData *
This is our specific version. We subclass the generic CFComponent. * We first call super.process() [which handles actions like 'click'] * The types of objects handled here are 'GuiSubitemTestObject'. * Example:custTableTable().click(atCell(atColumn("PHONE"), * atRow("NAME", "Jill Sanford", * "CUSTID", "19", "STREET", * "80 West End"))); * The actions handled here are: *


Side Effects: Processor.testRecordDatastatusCode is set based on the result of the processing
State Read: Processor.testRecordData,Processor.params
Assumptions: none

Overrides:
localProcess in class CFComponent

commandClickCellOfColWithRowValues

protected void commandClickCellOfColWithRowValues()
                                           throws SAFSException

Purpose: commandClickCellOfColWithRowValues: process commands like: clickCellOfColWithRowValues, doubleclickCellOfColWithRowValues Example:custTableTable().click(atCell(atColumn("PHONE"), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End"))); // with no coords Example:custTableTable().click(atCell(atColumn("PHONE"), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End")), atPoint(4,5)); // with coords
example step commands:
T,Frame,custTableTable,clickCellOfColWithRowValues,,PHONE,CUSTID,5,NAME,Susan Flontly,STREET,750 Central Expy
T,Frame,orderTableTable,clickCellOfColWithRowValues,,QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
T,Frame,orderTableTable,clickCellOfColWithRowValues,44;15,QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
T,Frame,orderTableTable,clickCellOfColWithRowValues,"Coords=44;15",QUANTITY,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
first param is cell pixel xoffset and yoffset
second param is the column name, remaining params are the name/value pairs for the row specification for the cell

Throws:
SAFSException

commandClick

protected void commandClick(boolean fuzzy)
                     throws SAFSException
Process commands like: clickcell, doubleclickcell, activatecell Example:custTableTable().click(atCell(atRow(rowIndex), atColumn(colIndex)));
first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric

Parameters:
fuzzy, - is it a partial match on the column name or cell value
NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)
Throws:
SAFSException

selectCellText

protected void selectCellText(boolean fuzzy)
                       throws SAFSException
Example:custTableTable().click(atCell(atRow(rowIndex), atColumn(colIndex))); first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric the row could be the value of a cell in col #1.

Throws:
SAFSException

performClick

protected void performClick(java.lang.Object point)
Overrides CFComponent performClick to intercept TableCell specs. TableCell specifies "Row=n;Col=n" where normally Coords=x,y would be issued.

Overrides:
performClick in class CFComponent
Parameters:
point - Object if instanceof TableCell, handle here; otherwise handle in CFComponent superclass.

commandClickFind

protected void commandClickFind(boolean fuzzy)
                         throws SAFSException

Purpose: commandClickFind: process commands like: click, doubleclick, activatecell
example step commands:
T,Frame,custTableTable,selectCellTextFind,rowIndexVar,3, FindCol1, FindVal1, FindCol2, FindVal2
T,Frame,orderTableTable,selectCellTextFind,rowIndexVar,PHONE NUM, FindCol1, FindVal1, FindCol2, FindVal2,FindCol3,FindVal3
second param is the column name/num to select, the rest of the params go in pairs, first a findColumn, then a findValue. all the columns can be specified as either column name or column number. All of the rows are searched until an exact match for all of the findcol/fundval parameters are matched.
the first param, rowindex, is a variable which is assigned the row index found.

Parameters:
fuzzy, - is it a partial match on the column name or cell value
NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)
Throws:
SAFSException

commandSelectRowWithRowValues

protected void commandSelectRowWithRowValues()
                                      throws SAFSException

Purpose: commandSelectRowWithRowValues: process commands like: selectRowWithRowValues Example:custTableTable().setState(Action.select(), atRow("NAME", "Jill Sanford", "CUSTID", "19", "STREET", "80 West End"));
example step commands:
T,Frame,custTableTable,select,CUSTID,5,NAME,Susan Flontly,STREET,750 Central Expy
T,Frame,orderTableTable,select,ORDERDATE,3/11/98,EXPDATE,1298,QUANTITY,3
all of the params are the name/value pairs for the row specification for the row to select

Throws:
SAFSException

commandVerifyCellText

protected void commandVerifyCellText(boolean fuzzy)
                              throws SAFSException

Purpose: commandVerifyCellText: process commands like: verifyCellText and verifyCellTextContains

example step commands:


T, JavaWin, JTable, VerifyCellText, FirstCellValue
Compares the value of cell 1,1 in JTable to bench text "FirstCellValue". Default row and column indices substituted for missing parameters.

T, JavaWin, JTable, VerifyCellText, "FirstCellValue", 1,1
Compares the value of cell 1,1 in JTable to bench text "FirstCellValue".

T, JavaWin, JTable, VerifyCellText, "BenchValue", 4, "Field5"
Compares the value of cell 4, Field5 in JTable to bench text "BenchValue". The column is determined by matching the text "Field5" to the field headers in the JTable.

T, JavaWin, JTable, VerifyCellTextContains, "ench", 4, "Field5"
Compares the value of cell 4, Field5 in JTable to bench substring "ench". The column is determined by matching the text "Field5" to the field headers in the JTable.


NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Parameters:
fuzzy, - boolean
Throws:
SAFSException

commandVerifyCellTextFind

protected void commandVerifyCellTextFind(boolean fuzzy)
                                  throws SAFSException

Purpose: commandVerifyCellTextFind: process commands like: verifyCellTextFind

example step commands:
T, JavaWin, JTable, VerifyCellText, "BenchValue", rowIndexVar, "Field5", FindCol1, FindVal1, FindCol2, FindVal2,FindCol3,FindVal3
Compares value of a found cell row, column Field5 in JTable to bench text "BenchValue".
third param is the column name/num to select, the rest of the params go in pairs, first a findColumn, then a findValue. all the columns can be specified as either column name or column number. All of the rows are searched until an exact match for all of the findcol/fundval parameters are matched.
the second param, rowindex, is a variable which is assigned the row index found.
NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Parameters:
fuzzy, - boolean
Throws:
SAFSException

commandAssignCellTextRow

protected void commandAssignCellTextRow(boolean fuzzy)
                                 throws SAFSException

Purpose: commandAssignCellTextRow:
Assign the "found row number" to a staf variable.
Find the cell according to the "found row number" and "given column" and assing the cell value to the varibalb.value

example step commands:
T, Window, Table, AssignCellTextRow, "aVariable", "Date", FindCol1, FindVal1, FindCol2, FindVal2,FindCol3,FindVal3

The first parameter, "aVariable", is a STAF variable which will contain the "found row number".
And "aVariable.value" will be a STAF variable which will contain the cell value.

The second param, "Date", is a "column header name" or "column number".

The rest of the params, "findcol/fundval ...", go in pairs, first a findColumn, then a findValue.

All the columns can be specified as either column name or column number. --> "given column"
All of the rows are searched until an exact match for all of the findcol/fundval parameters are matched. --> "found row number"
NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Parameters:
fuzzy, - boolean
Throws:
SAFSException

commandAssignVariableCellText

protected void commandAssignVariableCellText(boolean fuzzy)
                                      throws SAFSException

Purpose: commandAssignVariableCellText: process commands like: assignvariablecelltext

example step commands:


T, JavaWin, JTable, AssignVariableCellText, AVariableName
Assign the value of cell 1,1 in JTable to DDVariable ^AVariableName.

T, JavaWin, JTable, AssignVariableCellText, "AVariableName", 2,3
Assign the value of cell 2,3 in JTable to DDVariable ^AVariableName.

T, JavaWin, JTable, AssignVariableCellText, "AVariableName", 4, "Field5"
Assign the value of cell 4, Field5 in JTable to DDVariable ^AVariableName.
The column is determined by matching the text "Field5" to the field headers in the JTable.


NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Parameters:
fuzzy, - boolean, if true then substrings or case insensitive match
Throws:
SAFSException

commandCaptureRangeToFile

protected void commandCaptureRangeToFile(boolean fuzzy)
                                  throws SAFSException
process commands like CaptureRangeToFile, CaptureFuzzyRangeToFile NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Parameters:
fuzzy - boolean, if true then match substrings and ignore case for any specified column names or row value identifiers.
Throws:
SAFSException

getRealTable

protected GuiTestObject getRealTable(java.lang.Object table)
                              throws java.lang.IllegalArgumentException
Attempts to cast the generic Object to a GuiTestObject. Also, for certain "custom" tables, like JCTables, we attempt to extract the embedded Java table from the custom wrapper.

Parameters:
table -
Returns:
GuiTestObject reference to the real Java table.
Throws:
java.lang.IllegalArgumentException
See Also:
getJCTable(TestObject)

captureObjectData

protected java.util.List captureObjectData(TestObject table)
                                    throws java.lang.IllegalArgumentException,
                                           SAFSException
Captures the object data into a List of rows. Each row is a List of column values. The first row is a List of Column names, if any. If no column names exists then this first row will be a List of empty strings.

Overrides:
captureObjectData in class CFComponent
Parameters:
table - GuiTestObject to snapshot data from.
Returns:
List of rows of column value Lists. Null if an invalid table reference is provided or some other error occurs.
Throws:
SAFSException
java.lang.IllegalArgumentException - if table is not an acceptable GuiTestObject.
See Also:
CFComponent.captureObjectData(TestObject), formatObjectData(java.util.List)

formatObjectData

public java.lang.String formatObjectData(java.util.List list)
                                  throws java.lang.IllegalArgumentException
Format the List data into a single String. This String may include whatever formatting like Tabs, line separators, etc. are needed for the command being executed. For example, the commands CaptureRangeToFile and CaptureObjectDataToFile have historically written different formatted versions of the same data to files. This method may route to helper methods for formatting the data based on the action command currently being executed.

The List is expected to be a List of Lists as provided by our local captureObjectData. Each final item in the List will be output using its toString().trim() method.

It is expected the data is ready for writing to a file or other similar use without further modification.

Overrides:
formatObjectData in class CFComponent
Parameters:
list - List returned from captureObjectData
Returns:
String formatted for writing to file or screen.
Throws:
java.lang.IllegalArgumentException - if the List or the Object extracted from the List are null.
See Also:
captureObjectData(TestObject), CFComponent.formatObjectData(java.util.List)

getObjectData

protected java.util.List getObjectData(GuiTestObject table,
                                       java.lang.Integer rrow,
                                       java.lang.Integer rrows,
                                       java.lang.String rowval,
                                       java.lang.Integer ccol,
                                       java.lang.Integer ccols,
                                       java.lang.String column,
                                       boolean fuzzy)
                                throws java.lang.IllegalArgumentException,
                                       SAFSException
Captures the object data into a Tab delimited List of values. Each row is a separate item in the List. Some additional formatting of blank lines and Tab prefixes are added where appropriate to match outputs provided by other engines.

Parameters:
table - GuiTestObject to snapshot data from.
rrow - Integer default row# to begin capture. 0 = first row. Null will force default to first row.
rrows - Integer of number of rows to capture. Null means All.
rowval - String value in first column identifying first row to capture. Null means start at first row.
ccol - Integer default column# to begin capture. 0 = first column. Null will force default to first column.
ccols - Integer of number of columns to capture. Null means All.
column - String of column header text identifying column to start capture. Null means start at specified default first column.
fuzzy - true if column and rowval text need NOT be an exact match.
Returns:
java.util.List containing all captured rows.
Throws:
SAFSException
java.lang.IllegalArgumentException
See Also:
getColi(boolean, String, GuiTestObject), getRowi(boolean, Collection, GuiTestObject)

actionCaptureRangeToFile

protected void actionCaptureRangeToFile(GuiTestObject guiObj,
                                        java.lang.Integer rrow,
                                        java.lang.Integer rrows,
                                        java.lang.String rowval,
                                        java.lang.Integer ccol,
                                        java.lang.Integer ccols,
                                        java.lang.String column,
                                        java.lang.String filename,
                                        boolean fuzzy)
                                 throws SAFSException

Purpose: actually do the capture action

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
rowval, - String
column, - String
var, - String
Throws:
SAFSException

getColi

protected int getColi(boolean fuzzy,
                      java.lang.String column,
                      GuiTestObject guiObj)
               throws SAFSException

Purpose: get the column number based on fuzzy match

Parameters:
fuzzy, - boolean
column, - String
guiObj, - GuiSubitemTestObject
Returns:
Integer
Throws:
SAFSException

getRowi

protected int getRowi(boolean fuzzy,
                      java.util.Collection rowvalsParam,
                      GuiTestObject guiObj)
               throws SAFSException

Purpose: get the row number based on fuzzy match

Parameters:
fuzzy, - boolean
rowvalsParam, - Collection of collection, the inner collection is length 2 with the first element being the column number/name, and the second being the value; if the element on the outer collection is not a collection, then we only look in the first column for the 'value' of that element.
guiObj, - GuiSubitemTestObject
Returns:
Integer
Throws:
SAFSException, - if no row found that matches exactly
SAFSException

getNumRows

protected int getNumRows(TestObject jctable)
                  throws SAFSException

Purpose: get number of rows in table

Parameters:
jctable, - TestObject
Returns:
int
Throws:
SAFSException - based on caught Exception

getNumColumns

protected int getNumColumns(TestObject jctable)
                     throws SAFSException

Purpose: get number of columns in table

Parameters:
jctable, - TestObject
Returns:
int
Throws:
SAFSException - based on caught Exception

getCell

protected Cell getCell(int row,
                       int col)
                throws SAFSException

Purpose: get a Cell based on row and col

Parameters:
row, - int
col, - int
Returns:
Cell, the cell
Throws:
SAFSException - based on caught Exception

getCell

protected java.lang.Object getCell(TestObject jctable,
                                   int row,
                                   int col)
                            throws SAFSException

Purpose: get a cell based on row and col

Parameters:
jctable, - TestObject
row, - int
col, - int
Returns:
Object, contents of cell
Throws:
SAFSException - based on caught Exception, like ClassCastException

actionAssign

protected void actionAssign(GuiTestObject guiObj,
                            int row,
                            int col,
                            java.lang.String rowval,
                            java.lang.String column,
                            java.lang.String var)
                     throws SAFSException

Purpose: actually do the assign action

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
rowval, - String
column, - String
var, - String
Throws:
SAFSException

actionVerify

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

Purpose: actually do the verify action

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
rowval, - String
column, - String
fuzzy, - boolean
val, - String
Throws:
SAFSException

convertCoords

public java.awt.Point convertCoords(java.lang.String coords)
Overrides the version in superclass ComponentFunctions to allow for alternative of "Row=1;Col=1" or "Col = 1;Row = 1". Standard "Coords=" usage will still be handled by the superclass.

The calling routine will have to determine whether the returned Point is an x,y coordinate or a row,col cell -- probably by checking for "Row" or "Col" text in the provided string just as we do internally.

Overrides:
convertCoords in class ComponentFunction
Parameters:
coords, - String x;y or x,y or Coords=x;y or Coords=x,y or Row=y,Col=x or Col=x;Row=y
Returns:
Point if successfull, null otherwise

doActionClick

protected void doActionClick(GuiSubitemTestObject guiObj,
                             int row,
                             int col,
                             java.lang.String rowval,
                             java.lang.String colval)
                      throws SAFSException
Attempt to perform a click-type action on a cell and issue a success message if successful. The routines in here may throw Exceptions that should be caught by the calling routine. This routine is generally called internally by other functions like commandClick.

Throws:
SubitemNotFoundException
java.lang.NullPointerException
WrappedException
SAFSException - (often passed through the caller)

actionClick

protected void actionClick(GuiTestObject guiObj,
                           int row,
                           int col,
                           java.lang.String rowval,
                           java.lang.String column)
                    throws SAFSException
Perform a click-variant action on a cell in a table.

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
Throws:
SAFSException

actionClick

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
Perform a click action (this version takes 4 params), not implemented for CFTable, just reverts to the other version...

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
Throws:
SAFSException

getJCTable

protected TestObject getJCTable(TestObject jctable)
                         throws SAFSException
drill down through wrapper objects to get the table
Assumptions: to be used by sub-classes. This version just returns passed value

Parameters:
jctable, - TestObject
Returns:
TestObject
Throws:
SAFSException

commandGetCellCoordinates

protected void commandGetCellCoordinates()
                                  throws SAFSException
Throws:
SAFSException

actionGetCellCoordinates

protected void actionGetCellCoordinates(GuiTestObject guiObj,
                                        int row,
                                        int col,
                                        java.lang.String xCoordVariable,
                                        java.lang.String yCoordVariable)
                                 throws SAFSException

Purpose: GetCellCoordinates, *NOTE* currently not implemented, but will be implemented by classes that extend this class

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
String, - xCoordVariable
String, - yCoordVariable
Throws:
SAFSException

commandVerifyRowLabel

protected void commandVerifyRowLabel()
                              throws SAFSException
Throws:
SAFSException

actionVerifyRowLabel

protected void actionVerifyRowLabel(GuiTestObject guiObj,
                                    java.lang.String val,
                                    int row)
                             throws SAFSException

Purpose: VerifyRowLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class

Parameters:
guiObj, - GuiTestObject
val, - String
row, - int
Throws:
SAFSException

commandVerifyColumnLabel

protected void commandVerifyColumnLabel()
                                 throws SAFSException
Throws:
SAFSException

actionVerifyColumnLabel

protected void actionVerifyColumnLabel(GuiTestObject guiObj,
                                       java.lang.String val,
                                       int col)
                                throws SAFSException

Purpose: VerifyColLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class

Parameters:
guiObj, - GuiTestObject
val, - String
col, - int
Throws:
SAFSException

commandClickRowLabel

protected void commandClickRowLabel()
                             throws SAFSException

Purpose: commandClickRowLabel: process commands like: click, doubleclick, activate
T,windowName,TableName,clickRowLabel,2
T,windowName,TableName,doubleclickRowLabel,2
T,windowName,TableName,activateRowLabel,2

Throws:
SAFSException

actionClickRowLabel

protected void actionClickRowLabel(GuiTestObject guiObj,
                                   int row,
                                   int xoffset)
                            throws SAFSException

Purpose: ClickRowLabel, *NOTE* currently not implemented, but will be implemented by classes that extend this class

Parameters:
guiObj, - GuiTestObject
row, - int
Optional - xoffset, int
Throws:
SAFSException

commandClickColumnLabel

protected void commandClickColumnLabel()
                                throws SAFSException

Purpose: commandClickColumnLabel: process commands like: click, doubleclick, activate
T,windowName,TableName,clickColumnLabel,2
T,windowName,TableName,doubleclickColumnLabel,2
T,windowName,TableName,activateColumnLabel,2

Throws:
SAFSException

actionClickColumnLabel

protected void actionClickColumnLabel(GuiTestObject guiObj,
                                      int col,
                                      int yoffset)
                               throws SAFSException

Purpose: ClickColumnLabel,DoubleClickColumnLabel, ActivateColumnLabel

Parameters:
guiObj, - GuiTestObject
col, - int
Optional - yoffset, int
Throws:
SAFSException

getLocalRect

protected java.awt.Rectangle getLocalRect(GuiTestObject jctable,
                                          int row,
                                          int col)

Purpose: getLocalRect get a rectangle based on row and col indicating the offset

Parameters:
jctable - GuiTestObject
row - int
col - int
Returns:
java.awt.Rectangle

commandVerifyCellEditable

protected void commandVerifyCellEditable()
                                  throws SAFSException

Purpose: commandVerifyCellEditable:
T,windowName,TableName,VerifyCellEditable,2,4,true or false
T,windowName,TableName,VerifyCellEditable,2,Field4, true or false


first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric fuzzy, is it a partial match on the column name or cell value.


NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Throws:
SAFSException

actionVerifyCellEditable

protected void actionVerifyCellEditable(GuiTestObject guiObj,
                                        int row,
                                        int col,
                                        boolean verifyFlag)
                                 throws SAFSException

Purpose: VerifyCellEditable

example step commands:


T, JavaWin, JCTable, VerifyCellEditable, 2,5,true
Verifies the cell in the Table, at row = 2, col = 5 is ediable. Validates the cell property
to a known value.

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
verifyFlag, - boolean
Throws:
SAFSException

commandSelectCellTextSpecial

protected void commandSelectCellTextSpecial(boolean fuzzy)
                                     throws SAFSException

Purpose: commandSelectCellTextSpecial: process command click, with Contorl or shirt key and left or right mouse button. Example:custTableTable().click(SHIFT_LEFT, atCell(atRow(rowIndex), atColumn(colIndex))); Example:custTableTable().click(CTRL_LEFT, atCell(atRow(rowIndex), atColumn(colIndex)));
example step commands: (params are Control, row, then column index)
T,Frame,custTableTable,SelectCellTextSpecial,Control,Left, 2,3
T,Frame,orderTableTable,SelectCellTextSpecial,Control,Left,4,PHONE NUM
T,Frame,custTableTable,SelectCellTextSpecial,Shift,Left, 2,3
T,Frame,orderTableTable,SelectCellTextSpecial,Shift,Left,4,PHONE NUM


first param is the row and second param is column (both from 1), the col could be the name of the column, if non-numeric fuzzy, is it a partial match on the column name or cell value.


NOTE: if fuzzy is true then: (case is ignored; if matching columns, or if matching cell values, use substrings)

Throws:
SAFSException

actionLocalSelectCellTextSpecial

protected void actionLocalSelectCellTextSpecial(GuiTestObject guiObj,
                                                int row,
                                                int col,
                                                java.lang.String rowval,
                                                java.lang.String column,
                                                boolean control,
                                                boolean shift,
                                                boolean leftRight)
                                         throws SAFSException,
                                                SubitemNotFoundException,
                                                java.lang.NullPointerException,
                                                WrappedException
Throws:
SAFSException
SubitemNotFoundException
java.lang.NullPointerException
WrappedException

actionSelectCellTextSpecial

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

Purpose: actually do the right or left click action with Contorl or Shift key pressed.

Parameters:
guiObj, - GuiTestObject
row, - int
col, - int
control, - boolean
shift, - boolean
leftRight, - boolean
Throws:
SAFSException

commandGetTableRowColumnCount

protected void commandGetTableRowColumnCount()
                                      throws SAFSException

Purpose: commandGetTableRowColumnCount
T,windowName,TableName,GetTableRowColumnCount,retRowCountVar, retColCountVar



Throws:
SAFSException

actionGetTableRowColumnCount

protected void actionGetTableRowColumnCount(GuiTestObject guiObj,
                                            java.lang.String rowCountVariable,
                                            java.lang.String colCountVariable)
                                     throws SAFSException

Purpose: GetTableRowColumnCount *NOTE* currently not implemented, but will be implemented by classes that extend this class

Parameters:
guiObj, - GuiTestObject
String, - rowCountVariable
String, - colCountVariable
Throws:
SAFSException

getColumnName

protected java.lang.String getColumnName(TestObject guiObj,
                                         int col)
Retrieve the column name for the provided zero-based column number.

Parameters:
guiObj - Expected to be a Table with a getColumnName(i) method that returns a String.
col - the column to get the name of.
Returns:
String column name or null if not available or an error occurs.

getCellText

protected java.lang.String[] getCellText(TestObject guiObj,
                                         TestObject tblModel,
                                         int row,
                                         int col)
Returns String[] String[0] = cell text value; String[1] = cell column name


getTableCellSubItemText

protected java.lang.String getTableCellSubItemText(TestObject guiObj,
                                                   int row,
                                                   int col)

isCustomCellObject

protected boolean isCustomCellObject(java.lang.String testObjectClass)

processCustomCellObject

protected java.lang.String processCustomCellObject(TestObject tblModelValue)

getCellText

protected java.lang.String getCellText(TestObject guiObj,
                                       int row,
                                       int col)
                                throws SAFSException
Note:
Get the text value of the cell at (row,col) in Java table
Its subclass may override this method.

Parameters:
guiObj -
row -
col -
Returns:
String, the text of the cell at row,col
Throws:
SAFSException