org.safs.rational
Class CFComboBox

java.lang.Object
  extended by org.safs.Processor
      extended by org.safs.ComponentFunction
          extended by org.safs.rational.CFComponent
              extended by org.safs.rational.CFComboBox
Direct Known Subclasses:
CFFlexComboBox

public class CFComboBox
extends CFComponent


Purpose: CFComboBox, process a ComboBox component
Lifetime: instantiated by TestStepProcessor

Since:
JUN 17, 2003
JUL 17, 2003 (DBauman) Original Release
MAR 18, 2004 (BNat) Select keyword updated with Null Pointer Exception.
JUN 21, 2005 (Jeremy_J_Smith) Post-Set verification now consistent with regular VERIFYSELECTED method.
JUN 22, 2005 (Jeremy_J_Smith) Post-Set verification enhancements and new SETUNVERIFIEDTEXTVALUE action.
JUL 10, 2008 (JunwuMa)Modified methods verifySelectedText() and verifyTextProperty() to ensure they can work with .NET objects for SELECT and SELECTTEXTITEM,VERIFYSELECTED and VERIFYSELECTEDITEM. JUL 11, 2008 (JunwuMa)Added getItems() supporting .NET for CAPTUREITEMSTOFILE,SELECTPARTIALMATCH. Switched on .NET domain support in SetTextValue() for SETTEXTVALUE and SETUNVERIFIEDTEXTVALUE All keywords in this class are already .NET supported.
SEP 12, 2008 (LeiWang) Modify hideCombo() and showCombo(). Right-click can not hide the combo list. A simple click can open and close the combo list. But before using showCombo(), we are must suer the combobox is hide; otherwise the combobox will be closed. The same to hideCombo().
OCT 04, 2008 (LeiWang) Modify method verifySelectedText(). Test the object type before casting. See defect S0534980.
NOV 25, 2008 (LeiWang) Modify method setTextValue(): If value contains special, do not verify. See defect S0546329.
DEC 03, 2008 (CANAGL) Modify SelectPartialMatch to selectAtIndex if selectAtText fails after 4 attempts.
DEC 04, 2008 (LeiWang) Modify method setTextValue(): Include win domain to be processed. Now Java, Net, Win domain are included. For win doamin, keywords with verification are not supported. See defect S0550143.
DEC 10, 2008 (LeiWang) Modify method getItems(): treat combobox in toolbar, the type of combobox is "System.Windows.Forms.ToolStripComboBox+ToolStripComboBoxControl"
DEC 24, 2008 (LeiWang) Modify method verifySelectedText(): add support for window ComboBox. See defect S0554263.

Field Summary
static java.lang.String CAPTUREITEMSTOFILE
           
static java.lang.String HIDELIST
           
static java.lang.String SELECT
           
static java.lang.String SELECTINDEX
           
static java.lang.String SELECTPARTIALMATCH
           
static java.lang.String SELECTTEXTITEM
           
static java.lang.String SELECTUNVERIFIED
           
static java.lang.String SELECTUNVERIFIEDTEXTITEM
           
static java.lang.String SETTEXTVALUE
           
static java.lang.String SETUNVERIFIEDTEXTVALUE
           
static java.lang.String SHOWLIST
           
static java.lang.String VERIFYSELECTED
           
static java.lang.String VERIFYSELECTEDITEM
           
 
Fields inherited from class org.safs.rational.CFComponent
ALTLEFTDRAG, ASSIGNPROPERTYVARIABLE, CAPTUREOBJECTDATATOFILE, CAPTUREPROPERTIESTOFILE, CAPTUREPROPERTYTOFILE, CLEARAPPMAPCACHE, CLICK, CLOSEWINDOW, COMPONENTCLICK, CTRLALTLEFTDRAG, CTRLCLICK, CTRLLEFTDRAG, CTRLRIGHTCLICK, CTRLSHIFTLEFTDRAG, DOUBLECLICK, GETGUIIMAGE, GUIDOESEXIST, GUIDOESNOTEXIST, HOVERMOUSE, HSCROLLTO, INPUTCHARACTERS, INPUTKEYS, LEFTDRAG, MAXIMIZE, MINIMIZE, obj1, RESTORE, RIGHTCLICK, RIGHTDRAG, script, SELECTMENUITEM, SELECTMENUITEMCONTAINS, SETPOSITION, SETPROPERTYVALUE, SHIFTCLICK, SHIFTLEFTDRAG, 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
CFComboBox()
          
Purpose: constructor, calls super
 
Method Summary
protected  void captureItemsToFile()
          
Purpose: captureItemsToFile
protected  java.util.List captureObjectData(TestObject table)
          Captures the object data into a List.
protected  boolean compareValues(java.lang.String value, java.lang.String param)
          
Purpose: compareValues and report failure if not matching.
protected  void localProcess()
          
Purpose: process: process the testRecordData
This is our specific version.
protected  void setTextValue(boolean performVerification)
          
Purpose: setTextValue
 
Methods inherited from class org.safs.rational.CFComponent
captureObjectDataToFile, checkForCoord, checkForCoord, componentClick, convertObjectValueToString, extractTreeItemsSub, findMenuBars, formatObjectData, getAppletsBrowser, getComponentRectangle, getHelpers, getObjectProperty, getObjectPropertyFromProperties, getUserObject, isDotnetDomain, isFlexDomain, isHtmlDomain, isJavaDomain, isSwtDomain, isSWTWidget, isWinDomain, listAllProperties, listAllProperties, listMethods, listNonValueProperties, listProperties, matchedPathOfMenuItem, parseWhereInfo, performClick, preformDrag, process, selectMenuItem, setPosition, tobj, verifyMenuItem
 
Methods inherited from class org.safs.ComponentFunction
action_getGuiImage, action_verifyGuiImageToFile, componentExecutedFailureMessage, componentFailureMessage, componentSuccessMessage, convertCoords, 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

CAPTUREITEMSTOFILE

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

SHOWLIST

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

HIDELIST

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

SELECT

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

SELECTTEXTITEM

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

SELECTINDEX

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

SELECTPARTIALMATCH

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

SELECTUNVERIFIED

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

SELECTUNVERIFIEDTEXTITEM

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

SETTEXTVALUE

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

SETUNVERIFIEDTEXTVALUE

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

VERIFYSELECTED

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

VERIFYSELECTEDITEM

public static final java.lang.String VERIFYSELECTEDITEM
See Also:
Constant Field Values
Constructor Detail

CFComboBox

public CFComboBox()

Purpose: constructor, calls super

Method Detail

localProcess

protected void localProcess()

Purpose: process: process the testRecordData
This is our specific version. We subclass the generic CFComponent. The actions handled here are:


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

Overrides:
localProcess in class CFComponent

captureObjectData

protected java.util.List captureObjectData(TestObject table)
                                    throws java.lang.IllegalArgumentException,
                                           SAFSException
Captures the object data into a List. This is generally for the CaptureObjectDataToFile and VerifyObjectDataToFile, CaptureItemsToFile and SelectPartialMatch commands.

Overrides:
captureObjectData in class CFComponent
Parameters:
table - TestObject to snapshot data from.
Returns:
List containing a single Object item. Null if an invalid table reference is provided or some other error occurs.
Throws:
SAFSException
java.lang.IllegalArgumentException - if table is not an acceptable TestObject.

captureItemsToFile

protected void captureItemsToFile()
                           throws SAFSException

Purpose: captureItemsToFile

example step commands:


T, JavaWin, JList, CaptureItemsToFile, AFileName.txt
Capture all items of JList to file AFileName.txt

Throws:
SAFSException

compareValues

protected boolean compareValues(java.lang.String value,
                                java.lang.String param)

Purpose: compareValues and report failure if not matching.


setTextValue

protected void setTextValue(boolean performVerification)
                     throws SAFSException

Purpose: setTextValue

example step commands:


T, JavaWin, JComboBox, SetTextValue, "04/20/1977"

Sets the "text" value of the combobox - value does not have to be in the "itemlist".
This method only works for JAVA components, not "HTML" ones...

Throws:
SAFSException