public class CFMenuBar extends CFComponent
ComponentFunction.Window
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ITEMCOUNT_PROPERTY |
static java.lang.String |
MENUCOUNT_PROPERTY |
static java.lang.String |
PATH_PREFIX |
static java.lang.String |
SELECTMENUITEM |
static java.lang.String |
SELECTMENUITEMCONTAINS |
static java.lang.String |
SELECTPOPUPMENUITEM |
static java.lang.String |
SELECTUNVERIFIEDMENUITEM |
static java.lang.String |
SELECTUNVERIFIEDPOPUPMENUITEM |
static java.lang.String |
TEXT_PROPERTY |
static java.lang.String |
UITYPE_MENUBAR |
static java.lang.String |
UITYPE_POPUPMENU |
static java.lang.String |
UITYPE_PROPERTY |
static java.lang.String |
VERIFYMENUITEM |
static java.lang.String |
VERIFYMENUITEMCONTAINS |
static java.lang.String |
VERIFYPOPUPMENU |
static java.lang.String |
VERIFYPOPUPMENUCONTAINS |
static java.lang.String |
VERIFYPOPUPMENUITEM |
static java.lang.String |
VERIFYPOPUPMENUPARTIALMATCH |
keepEncodingConsistent, obj1, script, winObject
action, ALTCLICK, ALTLEFTDRAG, altText, ASSIGNPROPERTYVARIABLE, CAPTUREOBJECTDATATOFILE, CAPTUREPROPERTIESTOFILE, CAPTUREPROPERTYTOFILE, CLEARAPPMAPCACHE, CLICK, CLOSEWINDOW, compName, COMPONENTCLICK, CTRLALTLEFTDRAG, CTRLCLICK, CTRLLEFTDRAG, CTRLRIGHTCLICK, CTRLSHIFTLEFTDRAG, DOUBLECLICK, GETGUIIMAGE, GETTEXTFROMGUI, GUIDOESEXIST, GUIDOESNOTEXIST, HOVERMOUSE, HSCROLLTO, INPUTCHARACTERS, INPUTKEYS, ISPROPERTYEXIST, iterator, LEFTDRAG, LOCATESCREENIMAGE, mapname, MAXIMIZE, MINIMIZE, MOUSECLICK, OBJECT_DATA, PARAM_FILTER, PARAM_UUID, PROPERTY_DOT_itemText, PROPERTY_innerHTML, PROPERTY_innerText, PROPERTY_Items, PROPERTY_text, PROPERTY_textContent, RELATIVE_TO_PARENT, RELATIVE_TO_SCREEN, RESTORE, RIGHTCLICK, RIGHTDRAG, SAVETEXTFROMGUI, SENDEVENT, SETPOSITION, SETPROPERTYVALUE, SHIFTCLICK, SHIFTLEFTDRAG, TEST_DATA_SUFFIX, utils, VERIFYARRAYPROPERTYTOFILE, VERIFYBINARYFILETOFILE, VERIFYCLIPBOARDTOFILE, VERIFYFILETOFILE, VERIFYGUIIMAGETOFILE, VERIFYOBJECTDATATOFILE, VERIFYPROPERTY, VERIFYPROPERTYCONTAINS, VERIFYPROPERTYTOFILE, VERIFYTEXTFILETOFILE, VERIFYVALUECONTAINS, VERIFYVALUEEQUALS, VERIFYVALUES, VERIFYVALUESIGNORECASE, VSCROLLTO, WAITFORGUI, windowName
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, RFSMCache, RFSMOnly, RFT_FIND_SEARCH_MODE_ALGORITHM, RFT_FIND_SEARCH_MODE_CACHE, 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, testrecordStackable, 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_3a, TXT_SUCCESS_4, TXT_SUCCESS_5, unexpectedAlertBehaviour, WARNING_MESSAGE, WARNING_OK_MESSAGE, warningStr, warningText
Constructor and Description |
---|
CFMenuBar()
Purpose: constructor, calls super |
Modifier and Type | Method and Description |
---|---|
protected java.util.List |
captureObjectData(com.rational.test.ft.object.interfaces.TestObject guiObj)
Turn the menu to a tree, and return each level of the tree node.
|
protected java.util.Map |
convertToMap(java.util.List pathToStatusList) |
protected Tree |
extractMenuItems(java.lang.Object obj,
int level)
Purpose: Extract a menu hierarchy from a TestObject; The item is for JMenuBars, JPopupMenus, JMenus, and JMenuItems (JMenu is subclass of JMenuItem). |
protected java.lang.String |
getAbsoluteFileName(java.lang.String filename,
java.lang.String parentDir) |
protected MenuTreeNode |
getNewTreeNode(java.lang.Object userObject,
int siblingCounter,
int childrenCounter)
Note: Needed to be overrided for other application than Swing.
|
protected java.lang.String |
getPath()
Retrieves the "path" parameter for commands like SelectMenuItem and SelectMenuItemContains.
|
protected java.lang.String |
getPropertyText(com.rational.test.ft.object.interfaces.TestObject menuObject)
Note: Try to get The value of "text" property of a menuitem.
|
protected java.lang.String |
getPropertyTextName() |
protected java.lang.String |
getStatus() |
protected java.lang.Integer |
getSubMenuItemCount(com.rational.test.ft.object.interfaces.TestObject aMenuObj)
Return the number of immediate child Menus or MenuItems from the provided JMenuBar or JMenu.
|
protected com.rational.test.ft.object.interfaces.GuiSubitemTestObject |
getSubMenuItemFullPath(com.rational.test.ft.object.interfaces.TestObject theObj,
java.lang.StringBuffer path)
theObj is expected to be a JMenu TestObject proxy (Usually a ToggleGUITestObject).
|
protected boolean |
isMenuBar(com.rational.test.ft.object.interfaces.TestObject menuObject)
Note: Needed to be override in subclass.
|
protected boolean |
isMenuItem(com.rational.test.ft.object.interfaces.TestObject menuObject)
Note: Needed to be override in subclass.
|
protected boolean |
isPopupMenu(com.rational.test.ft.object.interfaces.TestObject menuObject) |
protected void |
localProcess()
Purpose: process: process the testRecordData This is our specific version. |
protected void |
selectMenuBar(com.rational.test.ft.object.interfaces.TestObject menuObj,
java.lang.String menuItemPath,
boolean fuzzy,
boolean verify)
Purpose: Select a menuItem We use an equivalent of this to accomplish the select: jmbMenuBar().click(atPath("Admin->Customers...")); |
protected void |
selectMenuItem()
Purpose: Verify the existance of the path exactly, if it exists then select the path
|
protected void |
selectMenuItemContains()
Purpose: Verify the existance of the path non-exactly, if it exists then select the path
|
protected void |
selectMenuItemWithoutVerification(com.rational.test.ft.object.interfaces.GuiSubitemTestObject guiObj,
java.lang.String path) |
protected void |
selectMenuItemWithVerification(com.rational.test.ft.object.interfaces.GuiSubitemTestObject guiObj,
java.lang.String path,
boolean fuzzy) |
protected void |
selectUnverifiedMenuItem()
Purpose: Select the path (exactly matched) without verification of it's existance
|
protected void |
selectUnverifiedPopupMenuItem()
Purpose: Select the path provided without the verification of existance of this path
|
static Tree |
staticExtractMenuItems(java.lang.Object obj,
int level)
Note: This method is used by the RDDGUIUtilities.java
|
protected void |
verifyMenuBar(java.lang.Object anObj,
java.lang.String menuItemPath,
java.lang.String status,
boolean fuzzy)
Purpose: Verify the existance of a path and verify it's status |
protected void |
verifyMenuItem()
Purpose: Verify of existance of the provided path exactly
Verify whether the status of the menuitem matches the provided status (optional parameter) |
protected void |
verifyMenuItemContains()
Purpose: Verify of existance of the provided path non-exactly
Verify whether the status of the menuitem matches the provided status (optional parameter) |
protected void |
verifyPopupMenu()
Purpose: Verify the complete status of the current popup menu with a benchmark file.
|
_maximize, _minimize, _restore, _setPosition, _setSize, captureObjectDataToFile, capturePropertiesToFile, capturePropertyToFile, clearAppMapCache, closeWindow, componentClick, convertObjectValueToString, exist, extractTreeItemsSub, findMenuBars, formatObjectData, getAppletsBrowser, getComponentRectangle, getComponentRectangleOnScreen, getHelpers, getKeepEncodingConsistent, getObjectProperty, getObjectPropertyFromProperties, getProperties, getPropertyObject, getUserObject, getWindowRectangleOnScreen, inputKeystrokes, isDotnetDomain, isFlexDomain, isHtmlDomain, isJavaDomain, isSwtDomain, isSWTWidget, isWinDomain, listAllProperties, listAllProperties, listMethods, listNonValueProperties, listProperties, matchedPathOfMenuItem, mouseClick, parseWhereInfo, performClick, performDrag, performHoverMouse, performScorll, process, selectMenuItem, sendEvent, sendFlexEvent, setKeepEncodingConsistent, setPropertyValue, tobj, verifyClipboardToFile, verifyFileToFile, verifyMenuItem, verifyObjectDataToFile, verifyPropertyContains, verifyPropertyToFile, verifyValueContains, verifyValues
_close, action_ComputedStyle, action_getGuiImage, action_GetSaveTextFromGUI, action_showOnPage, action_verifyGuiImageToFile, assignPropertyVariable, captureObjectData, checkForCoord, checkForCoord, clearCache, close, componentExecutedFailureMessage, componentFailureMessage, componentProcess, componentSuccessMessage, convertCoords, convertLine, convertNum, convertWindowPosition, ConvertWindowPosition, deduceImageRect, dragTo, executeScript, getAlternateParams, getHelpersWorker, getPossibleMapItem, getProperty, getPropertyCollection, getPropertyCollection, getRectangleImage, getStringValue, getUUIDBoolean, guiDoesExist, hoverMouse, hoverScreenLocation, isPropertyExist, issueFileErrorFailure, issueParameterCountFailure, issueParameterCountFailure, issueParameterValueFailure, issuePassedSuccess, issuePassedSuccessUsing, issueUnknownErrorFailure, isSupportedRecordType, locateScreenImage, lookupAppMapCoordReference, lookupAppMapLineReference, lookupAppMapNumReference, lookupAppMapReference, maximize, minimize, normalizeFileEncoding, normalizePropertyCollection, restore, setIterator, setPosition, setRectVars, showComponentAsMuchPossible, updateFromTestRecordData, verifyPropertiesToFile, verifyProperty, waitForGUI, waitForObject
activateBreakpoint, checkBreakpoints, checkMyBreakpoints, deduceBenchFile, deduceDiffFile, deduceProjectFile, deduceTestFile, delay, distributeConfigInformation, getAbsolutFileName, getAppMapItem, getChainedProcessor, getClassInstance, getClearProxiesAlways, getCustomProcClassNames, getCustomProcInstancePath, getLogUtilities, getParams, getProcClassNames, getProcInstance, getProcInstancePath, getRequiredField, getSecsWaitForComponent, getSecsWaitForWindow, getStandardErrorMessage, getTestRecordData, getUnexpectedAlertBehaviour, getVariable, hasChainedProcessor, initProcessorAndProcess, instanceProcessorAndProcess, isBreakpointsOn, isComponentFunctionRecord, isDriverCommandRecord, isEngineCommandRecord, isMyBreakpointsOn, isRecordProcessed, isRFSMCache, isRFSMOnly, issueActionFailure, issueActionOnXFailure, issueErrorPerformingAction, issueErrorPerformingActionOnX, issueErrorPerformingActionUsing, issueInputRecordFailure, issueInputRecordFailure, issuePassedSuccess, logFailureMessage, normalizeTestFileName, paramsFailedMsg, paramsFailedMsg, popTestRecord, processCustomProcessor, processSubclassProcessor, pushTestRecord, setAtEndOfProcess, setBreakpointsOn, setChainedProcessor, setClearProxiesAlways, setCommandLineBreakpoint, setCustomProcInstancePath, setLogUtilities, setMyBreakpointsOn, setParams, setProcInstance, setProcInstancePath, setRecordProcessed, setRFSMCache, setRFSMOnly, setSecsWaitForComponent, setSecsWaitForWindow, setTestDomains, setTestRecordData, setUnexpectedAlertBehaviour, setVariable, standardFailureMessage, substituteVariable, validateParamSize, validProcessorClassName
public static final java.lang.String SELECTMENUITEM
public static final java.lang.String SELECTMENUITEMCONTAINS
public static final java.lang.String SELECTUNVERIFIEDMENUITEM
public static final java.lang.String SELECTPOPUPMENUITEM
public static final java.lang.String SELECTUNVERIFIEDPOPUPMENUITEM
public static final java.lang.String VERIFYMENUITEM
public static final java.lang.String VERIFYMENUITEMCONTAINS
public static final java.lang.String VERIFYPOPUPMENU
public static final java.lang.String VERIFYPOPUPMENUCONTAINS
public static final java.lang.String VERIFYPOPUPMENUITEM
public static final java.lang.String VERIFYPOPUPMENUPARTIALMATCH
public static final java.lang.String TEXT_PROPERTY
public static final java.lang.String ITEMCOUNT_PROPERTY
public static final java.lang.String MENUCOUNT_PROPERTY
public static final java.lang.String UITYPE_PROPERTY
public static final java.lang.String UITYPE_MENUBAR
public static final java.lang.String UITYPE_POPUPMENU
public static final java.lang.String PATH_PREFIX
protected void localProcess()
GuiSubitemTestObject
' and
'ToggleGUITestObject
'.
Path Example: "Admin->Customers..."
The actions handled here are:
Processor.testRecordData
statusCode is set
based on the result of the processing
Processor.testRecordData
, Processor.params
localProcess
in class CFComponent
protected void selectMenuItem() throws SAFSException
SAFSException
protected void selectMenuItemContains() throws SAFSException
SAFSException
protected void selectUnverifiedMenuItem() throws SAFSException
SAFSException
protected void selectUnverifiedPopupMenuItem() throws SAFSException
SAFSException
protected void verifyMenuItem() throws SAFSException
SAFSException
protected void verifyMenuItemContains() throws SAFSException
SAFSException
protected void verifyPopupMenu() throws SAFSException
SAFSException
protected void selectMenuBar(com.rational.test.ft.object.interfaces.TestObject menuObj, java.lang.String menuItemPath, boolean fuzzy, boolean verify) throws SAFSException
menuObj
- -- GuiSubItemTestObject representing a JMenuBar or JPopupMenu or JMenuItem or JMenu or
MainMenu, MenuItem, MenuStrip, and ToolStripMenuItemmenuItemPath
- -- String, path information to the final JMenu or JMenuItem or MenuItem or ToolStripMenuItem to be selected.fuzzy
- -- If false, match the given path exactly with the Menu.
This parameter will not be used if verify is false.verify
- -- If true, verify existance of path before selecting.SAFSException
protected void verifyMenuBar(java.lang.Object anObj, java.lang.String menuItemPath, java.lang.String status, boolean fuzzy) throws SAFSException
anObj
- -- GuiSubItemTestObject representing a JMenuBar or JPopupMenu.menuItemPath
- -- String, the path to be selectedstatus
- -- String, the menuItem status to be verifiedfuzzy
- -- If false, match the given path exactly with the Menu.SAFSException
protected void selectMenuItemWithoutVerification(com.rational.test.ft.object.interfaces.GuiSubitemTestObject guiObj, java.lang.String path)
guiObj,
- TestObject may be JMenuBar or JPopupMenupath,
- String is the full path of some MenuItem on which a click action will take placeprotected void selectMenuItemWithVerification(com.rational.test.ft.object.interfaces.GuiSubitemTestObject guiObj, java.lang.String path, boolean fuzzy)
guiObj,
- TestObject may be JMenuBar or JPopupMenupath,
- String is the full path of some MenuItem on which a click action will take placefuzzy,
- boolean, If true, we will do a non-exact verification of existance of pathprotected java.lang.String getPath()
protected java.lang.String getStatus()
protected java.lang.Integer getSubMenuItemCount(com.rational.test.ft.object.interfaces.TestObject aMenuObj)
aMenuObj
- -- Typically a JMenuBar or JMenu proxy. Will be cast to TestObject.protected com.rational.test.ft.object.interfaces.GuiSubitemTestObject getSubMenuItemFullPath(com.rational.test.ft.object.interfaces.TestObject theObj, java.lang.StringBuffer path) throws SAFSException
We are then going to go UP the tree to make the full path from menubar down to the subitem.
theObj
- -- The JMenu proxy to be evaluated.path
- -- The initial path provided prior to us filling in the full path up the hierarchy.
This must be the child path of "theObj"SAFSException
public static Tree staticExtractMenuItems(java.lang.Object obj, int level) throws SAFSException
SAFSException
protected Tree extractMenuItems(java.lang.Object obj, int level) throws SAFSException
obj,
- Object (TestObject)level,
- what level in the tree are we processingSAFSException
protected java.lang.String getAbsoluteFileName(java.lang.String filename, java.lang.String parentDir) throws SAFSException
filename
- StringparentDir
- String, the parent directory of the filenameSAFSException
protected java.util.Map convertToMap(java.util.List pathToStatusList)
pathToStatus,
- String contains "path=status". Example: "File->Open=Enabled"protected boolean isMenuBar(com.rational.test.ft.object.interfaces.TestObject menuObject) throws SAFSException
menuObject
- A TestObject represents a MenuBar or PopupMenu or Menu or MenuItemSAFSException
protected boolean isMenuItem(com.rational.test.ft.object.interfaces.TestObject menuObject) throws SAFSException
menuObject
- A TestObject represents a MenuBar or PopupMenu or Menu or MenuItemSAFSException
protected boolean isPopupMenu(com.rational.test.ft.object.interfaces.TestObject menuObject) throws SAFSException
menuObject
- SAFSException
protected java.lang.String getPropertyText(com.rational.test.ft.object.interfaces.TestObject menuObject)
menuObj
- A TestObject represents menu or menuItem.protected java.lang.String getPropertyTextName()
protected MenuTreeNode getNewTreeNode(java.lang.Object userObject, int siblingCounter, int childrenCounter)
userObject
- siblingCounter
- childrenCounter
- protected java.util.List captureObjectData(com.rational.test.ft.object.interfaces.TestObject guiObj) throws java.lang.IllegalArgumentException, SAFSException
captureObjectData
in class CFComponent
guiObj
- GuiTestObject to snapshot data from.SAFSException
java.lang.IllegalArgumentException
- if table is not an acceptable GuiTestObject.CFComponent.captureObjectData(TestObject)
,
CFComponent.formatObjectData(java.util.List)
Copyright © SAS Institute. All Rights Reserved.