public abstract class ComponentFunction extends Processor
Modifier and Type | Class and Description |
---|---|
static class |
ComponentFunction.Window
An inner class to encapsulate a window information for adjusting window size, position etc.
It includes also some static methods to restore, maximize, minimize or close current focused window. These methods may only work on Windows system, it uses java Robot to trigger shortcut menu. |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
action |
static java.lang.String |
ALTCLICK |
static java.lang.String |
ALTLEFTDRAG |
protected java.lang.String |
altText |
static java.lang.String |
ASSIGNPROPERTYVARIABLE |
static java.lang.String |
CAPTUREOBJECTDATATOFILE |
static java.lang.String |
CAPTUREPROPERTIESTOFILE |
static java.lang.String |
CAPTUREPROPERTYTOFILE |
static java.lang.String |
CLEARAPPMAPCACHE |
static java.lang.String |
CLICK |
static java.lang.String |
CLOSEWINDOW |
protected java.lang.String |
compName |
static java.lang.String |
COMPONENTCLICK |
static java.lang.String |
CTRLALTLEFTDRAG |
static java.lang.String |
CTRLCLICK |
static java.lang.String |
CTRLLEFTDRAG |
static java.lang.String |
CTRLRIGHTCLICK |
static java.lang.String |
CTRLSHIFTLEFTDRAG |
static java.lang.String |
DOUBLECLICK |
static java.lang.String |
GETGUIIMAGE |
static java.lang.String |
GETTEXTFROMGUI |
static java.lang.String |
GUIDOESEXIST |
static java.lang.String |
GUIDOESNOTEXIST |
static java.lang.String |
HOVERMOUSE |
static java.lang.String |
HSCROLLTO |
static java.lang.String |
INPUTCHARACTERS |
static java.lang.String |
INPUTKEYS |
static java.lang.String |
ISPROPERTYEXIST |
protected java.util.Iterator<java.lang.String> |
iterator |
static java.lang.String |
LEFTDRAG |
static java.lang.String |
LOCATESCREENIMAGE |
protected java.lang.String |
mapname |
static java.lang.String |
MAXIMIZE |
static java.lang.String |
MINIMIZE |
static java.lang.String |
MOUSECLICK |
protected static java.lang.String |
OBJECT_DATA |
static java.lang.String |
PARAM_FILTER
"FILTER"
|
static java.lang.String |
PARAM_UUID
"UUID"
|
protected static java.lang.String |
PROPERTY_DOT_itemText
".itemText" property for list and combobox to grab all the items.
|
protected static java.lang.String |
PROPERTY_innerHTML
"innerHTML", property to grab html element's content.
|
protected static java.lang.String |
PROPERTY_innerText
"innerText" property to html element's content.
|
protected static java.lang.String |
PROPERTY_Items
"Items", property to grab all the items for DotNet Control.
|
protected static java.lang.String |
PROPERTY_text
"text" property to grab item's label.
|
protected static java.lang.String |
PROPERTY_textContent
"textContent" property to html element's content.
|
static java.lang.String |
RELATIVE_TO_PARENT
'parent'
|
static java.lang.String |
RELATIVE_TO_SCREEN
'screen'
|
static java.lang.String |
RESTORE |
static java.lang.String |
RIGHTCLICK |
static java.lang.String |
RIGHTDRAG |
static java.lang.String |
SAVETEXTFROMGUI |
static java.lang.String |
SELECTMENUITEM |
static java.lang.String |
SELECTMENUITEMCONTAINS |
static java.lang.String |
SENDEVENT |
static java.lang.String |
SETPOSITION |
static java.lang.String |
SETPROPERTYVALUE |
static java.lang.String |
SHIFTCLICK |
static java.lang.String |
SHIFTLEFTDRAG |
protected static java.lang.String |
TEST_DATA_SUFFIX
".actual.txt", file suffix.
|
protected DDGUIUtilities |
utils |
static java.lang.String |
VERIFYARRAYPROPERTYTOFILE |
static java.lang.String |
VERIFYBINARYFILETOFILE |
static java.lang.String |
VERIFYCLIPBOARDTOFILE |
static java.lang.String |
VERIFYFILETOFILE |
static java.lang.String |
VERIFYGUIIMAGETOFILE |
static java.lang.String |
VERIFYMENUITEM |
static java.lang.String |
VERIFYMENUITEMCONTAINS |
static java.lang.String |
VERIFYOBJECTDATATOFILE |
static java.lang.String |
VERIFYPROPERTY |
static java.lang.String |
VERIFYPROPERTYCONTAINS |
static java.lang.String |
VERIFYPROPERTYTOFILE |
static java.lang.String |
VERIFYTEXTFILETOFILE |
static java.lang.String |
VERIFYVALUECONTAINS |
static java.lang.String |
VERIFYVALUEEQUALS |
static java.lang.String |
VERIFYVALUES |
static java.lang.String |
VERIFYVALUESIGNORECASE |
static java.lang.String |
VSCROLLTO |
static java.lang.String |
WAITFORGUI |
protected java.lang.String |
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 |
---|
ComponentFunction()
Purpose: constructor |
Modifier and Type | Method and Description |
---|---|
protected void |
_close()
This implementation is NOT guarantee to work, if it works, it will happen on current focused window.
Subclass should give its own implementation |
protected void |
_maximize()
Subclass should give its own implementation, if it is difficult then call this instead, but
this implementation is not guarantee to work |
protected void |
_minimize()
Subclass should give its own implementation, if it is difficult then call this instead, but
this implementation is not guarantee to work |
protected void |
_restore()
Subclass should give its own implementation, if it is difficult then call this instead, but
this implementation is not guarantee to work |
protected void |
_setPosition(java.awt.Point position)
Subclass should give its own implementation
|
protected void |
_setSize(java.awt.Dimension size)
Subclass should give its own implementation
|
protected void |
action_ComputedStyle(boolean verification) |
protected void |
action_getGuiImage()
Processes a Component Function Test Record to capture a screen GUI image to a file.
|
protected void |
action_GetSaveTextFromGUI()
Use OCR to detect the text from captured screen, executing SaveTextFromGUI or SaveTextFromGUI.
|
protected void |
action_showOnPage()
Purpose: Show the component on the page as much as possible.
|
protected void |
action_verifyGuiImageToFile()
Processes a Component Function Test Record to verify a screen GUI image to a file.
|
protected void |
assignPropertyVariable() |
protected java.util.Collection<java.lang.String> |
captureObjectData() |
protected void |
captureObjectDataToFile() |
protected void |
capturePropertiesToFile() |
protected void |
capturePropertyToFile() |
protected java.awt.Point |
checkForCoord(java.util.Iterator<java.lang.String> iterator)
Purpose: check 'iterator' for coords, either a map reference, or x;y notation and convert it into Point. |
protected java.awt.Point |
checkForCoord(java.lang.String coordinate)
Purpose: check for coords, either a map reference, or x;y notation
and convert it into Point.
|
protected void |
clearAppMapCache() |
protected void |
clearCache() |
protected void |
close()
Close the current window.
|
protected void |
closeWindow() |
protected void |
componentClick() |
protected void |
componentExecutedFailureMessage(java.lang.String error)
"windowname compName action processed with a negative result."
"Error at line number in file: [detail]"
Purpose: log a simple failure message when a test record got processed with negative result. |
protected void |
componentFailureMessage(java.lang.String detail)
"Unable to perform action on compName in file line N."
"[Detail]"
Purpose: log an "Unable to perform function" FAILED_MESSAGE with detail. |
protected void |
componentProcess()
Process generic actions on a component.
|
protected void |
componentSuccessMessage(java.lang.String detail)
"windowName compName action successful."
"[detail]"
Purpose: Log a generic success message. |
java.awt.Point |
convertCoords(java.lang.String coords)
Convert coordinates string of the formats:
"x;y"
"x,y"
"x y"
"Coords=x;y"
"Coords=x,y"
"Coords=x y"
into a java.awt.Point object.
|
java.awt.Polygon |
convertLine(java.lang.String coords)
Convert 2-point Line coordinates string of the formats:
"x1;y1;x2;y2"
"x1,y1,x2,y2"
"x1 y1 x2 y2"
"Coords=x1;y1;x2;y2"
"Coords=x1,y1,x2,y2"
"Coords=x1 y1 x2 y2"
into a java.awt.Polygon object.
|
java.lang.Integer |
convertNum(java.lang.String num)
Purpose: convertNum: convert into a number Assumptions: all exceptions are handled. |
ComponentFunction.Window |
convertWindowPosition(java.lang.String windowPosition)
Convert window's position-size-status string of the formats:
"x;y;width;height;status"
"x,y,width,height,status"
"x y width height status"
"Coords=x;y;width;height;Status=status"
"Coords=x,y,width,height,Status=status"
"Coords=x y width height Status=status"
into a org.safs.ComponentFunction.Window object.
|
static ComponentFunction.Window |
ConvertWindowPosition(java.lang.String windowPosition)
Convert window's position-size-status string of the formats:
"x;y;width;height;status"
"x,y,width,height,status"
"x y width height status"
"Coords=x;y;width;height;Status=status"
"Coords=x,y,width,height,Status=status"
"Coords=x y width height Status=status"
into a org.safs.ComponentFunction.Window object.
|
protected java.awt.Rectangle |
deduceImageRect(java.lang.String subareaMapKey) |
protected void |
dragTo() |
protected void |
executeScript() |
protected boolean |
exist()
To test if the component exists or not.
The sub class may test the component's visibility also. |
java.util.Collection<java.lang.String> |
getAlternateParams()
Purpose: zero-based params with: windowname compname +N additional parameters |
protected java.awt.Rectangle |
getComponentRectangle()
Do nothing method returns null.
|
protected java.awt.Rectangle |
getComponentRectangleOnScreen()
Get the absolute 'Rectangle bounds' of the Component, which means the rectangle is relative to the
whole screen, NOT to a window/browser. |
protected void |
getHelpers()
Simply calls getHelpersWorker.
|
protected void |
getHelpersWorker()
set instance variables from the current testRecordData:
actionwindowNamecompNamemapnameutils
Subclasses can override this for any additional setup beyond getHelpersWorker.
|
protected java.lang.String |
getPossibleMapItem(java.lang.String mapKey) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
protected java.lang.String |
getProperty(java.lang.String propertyName) |
protected java.util.Collection<java.lang.String> |
getPropertyCollection(java.util.List<java.lang.String> propertyList)
Get the value of property, and return them as a Collection.
If the property-list contains only ONE property, the collection will contain only its value. If the property-list contains multiple properties, the collection will contain a set of string like "property:value". The assignment separator will actually be the current value of the testRecordData.separator. |
protected java.util.Collection<java.lang.String> |
getPropertyCollection(java.lang.String property)
Get the value of a property, and return it as a Collection.
|
protected java.lang.Object |
getPropertyObject(java.lang.String propertyName) |
protected java.awt.image.BufferedImage |
getRectangleImage(java.awt.Rectangle imageRect)
Get BufferedImage within a rectangle.
The rectangle may be absolute on screen, Or it may be relative to a browser or something. It depends on what is returned by getComponentRectangle() .This method assume the rectangle is absolute on screen, so get the image on screen within the rectangle. Sub class may override this method to get its own image. |
protected java.lang.String |
getStringValue(java.lang.Object value)
Get the string value from the Object value.
If the value is a collection, it will be converted to a string separated by 'New Line'. |
static boolean |
getUUIDBoolean(java.lang.String parameter)
Check if the provided parameter is a UUID= flag.
True if UUID=true|1|-1|on|yes. |
protected java.awt.Rectangle |
getWindowRectangleOnScreen()
Get the absolute 'Rectangle bounds' of the Window, which means the rectangle is relative to the
whole screen. |
protected void |
guiDoesExist(boolean does) |
protected void |
hoverMouse()
Purpose: Response for HOVERMOUSE; called by componentProcess() to hover mouse.
|
protected void |
hoverScreenLocation() |
protected void |
inputKeystrokes() |
protected boolean |
isClickAction(java.lang.String action) |
protected void |
isPropertyExist() |
protected void |
issueFileErrorFailure(java.lang.String filename)
Issue a file error and failure message
Filename does not need to be localized.
|
protected void |
issueParameterCountFailure()
Issue parameter count error and failure message
|
protected void |
issueParameterCountFailure(java.lang.String detail)
Issue parameter count error and failure message
|
protected void |
issueParameterValueFailure(java.lang.String paramName)
Issue parameter value error and failure message
|
protected void |
issuePassedSuccess(java.lang.String comment)
"windowName compName action successful.
|
protected void |
issuePassedSuccessUsing(java.lang.String using)
"windowName compName action successful using [using]"
Sets status to OK and issues a PASSED message.
|
protected void |
issueUnknownErrorFailure(java.lang.String cause)
Issue a generic error and failure message
The cause parameter is expected to already be localized.
|
boolean |
isSupportedRecordType(java.lang.String recordType)
Supports standard TEST STEP record types (T, TW, TF)
|
protected void |
locateScreenImage()
Purpose: Response for HOVERMOUSE; called by componentProcess() to hover mouse.
|
protected java.awt.Point |
lookupAppMapCoordReference(java.lang.String referenceName)
lookupAppMapCoordReference: uses 'convertCoords'
after the call to 'lookupAppMapReference'.
|
protected java.awt.Polygon |
lookupAppMapLineReference(java.lang.String referenceName)
lookupAppMapLineReference: uses 'convertLine'
after the call to 'lookupAppMapReference'.
|
protected java.lang.Integer |
lookupAppMapNumReference(java.lang.String referenceName)
Purpose: lookupAppMapNumReference: uses 'convertNum' after the call to 'lookupAppMapReference'. |
protected java.lang.String |
lookupAppMapReference(java.lang.String referenceName)
Looks up an item using the current appmapID=mapname, section=compName, item=referenceName.
|
protected void |
maximize()
Maximize the current window.
|
protected void |
minimize()
Minimize the current window.
|
protected java.lang.String |
normalizeFileEncoding(java.lang.String encoding) |
static java.util.Collection<java.lang.String> |
normalizePropertyCollection(java.util.Collection<java.lang.String> properties,
java.lang.String encoding)
A Collection contains the value of a property.
|
protected void |
performDrag() |
protected boolean |
performHoverMouse(java.awt.Point point,
int milliseconds)
Purpose: perform hovering mouse at 'point' for 'milliseconds' period on a Component.
Subclass may need to give a specific implementation by tools (RJ, Selenium etc.) API. |
protected void |
performScorll() |
protected void |
restore()
Restore the current window.
|
protected void |
selectMenuItem(boolean fuzzy) |
protected void |
sendEvent() |
void |
setIterator(java.util.Iterator<java.lang.String> iterator) |
protected void |
setPosition()
perform SetPosition to move Main Window, resize it and set its status.
|
protected void |
setPropertyValue() |
protected boolean |
setRectVars(java.awt.Rectangle rect,
java.lang.String varname)
Set the varname.x, varname.y, varname.w, and varname.h variables to the
values retrieved from the rectangle.
|
protected boolean |
showComponentAsMuchPossible(boolean verify,
boolean refresh)
If the component is not fully shown on the screen, try to make it visible on screen as much
as possible.
|
protected void |
updateFromTestRecordData()
Updates our internal storage for action, windowName, compName, and mapname from
the current TestRecordData.
|
protected void |
verifyClipboardToFile() |
protected void |
verifyFileToFile(boolean isTextFile) |
protected void |
verifyMenuItem(boolean fuzzy) |
protected void |
verifyObjectDataToFile() |
protected void |
verifyPropertiesToFile()
Purpose: verifyPropertiesToFile |
protected void |
verifyProperty()
Purpose: verifyProperty |
protected void |
verifyPropertyContains() |
protected void |
verifyPropertyToFile(boolean array)
Purpose: verifyArrayPropertyToFile/verifyPropertyToFile/verifyPropertiesToFile |
protected void |
verifyValueContains() |
protected void |
verifyValues() |
protected void |
waitForGUI()
Waits for the object to be present on the screen, waits up to the timeout defined in
the parameters or a default of 15 seconds.
|
protected int |
waitForObject(java.lang.String mapname,
java.lang.String windowName,
java.lang.String compName,
int secii) |
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, process, 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 ALTCLICK
public static final java.lang.String CLICK
public static final java.lang.String COMPONENTCLICK
public static final java.lang.String CTRLCLICK
public static final java.lang.String CTRLRIGHTCLICK
public static final java.lang.String DOUBLECLICK
public static final java.lang.String MOUSECLICK
public static final java.lang.String RIGHTCLICK
public static final java.lang.String SHIFTCLICK
public static final java.lang.String HSCROLLTO
public static final java.lang.String VSCROLLTO
public static final java.lang.String ALTLEFTDRAG
public static final java.lang.String CTRLALTLEFTDRAG
public static final java.lang.String CTRLLEFTDRAG
public static final java.lang.String CTRLSHIFTLEFTDRAG
public static final java.lang.String LEFTDRAG
public static final java.lang.String RIGHTDRAG
public static final java.lang.String SHIFTLEFTDRAG
public static final java.lang.String ASSIGNPROPERTYVARIABLE
public static final java.lang.String CAPTUREOBJECTDATATOFILE
public static final java.lang.String CAPTUREPROPERTIESTOFILE
public static final java.lang.String CAPTUREPROPERTYTOFILE
public static final java.lang.String CLEARAPPMAPCACHE
public static final java.lang.String GUIDOESEXIST
public static final java.lang.String GUIDOESNOTEXIST
public static final java.lang.String GETGUIIMAGE
public static final java.lang.String HOVERMOUSE
public static final java.lang.String INPUTCHARACTERS
public static final java.lang.String INPUTKEYS
public static final java.lang.String ISPROPERTYEXIST
public static final java.lang.String SENDEVENT
public static final java.lang.String VERIFYARRAYPROPERTYTOFILE
public static final java.lang.String VERIFYBINARYFILETOFILE
public static final java.lang.String VERIFYCLIPBOARDTOFILE
public static final java.lang.String VERIFYFILETOFILE
public static final java.lang.String VERIFYGUIIMAGETOFILE
public static final java.lang.String VERIFYOBJECTDATATOFILE
public static final java.lang.String VERIFYPROPERTY
public static final java.lang.String VERIFYPROPERTYTOFILE
public static final java.lang.String VERIFYPROPERTYCONTAINS
public static final java.lang.String VERIFYTEXTFILETOFILE
public static final java.lang.String VERIFYVALUECONTAINS
public static final java.lang.String VERIFYVALUEEQUALS
public static final java.lang.String VERIFYVALUES
public static final java.lang.String VERIFYVALUESIGNORECASE
public static final java.lang.String SETPROPERTYVALUE
public static final java.lang.String GETTEXTFROMGUI
public static final java.lang.String LOCATESCREENIMAGE
public static final java.lang.String SAVETEXTFROMGUI
public static final java.lang.String CLOSEWINDOW
public static final java.lang.String MAXIMIZE
public static final java.lang.String MINIMIZE
public static final java.lang.String RESTORE
public static final java.lang.String SELECTMENUITEM
public static final java.lang.String SELECTMENUITEMCONTAINS
public static final java.lang.String SETPOSITION
public static final java.lang.String VERIFYMENUITEM
public static final java.lang.String VERIFYMENUITEMCONTAINS
public static final java.lang.String WAITFORGUI
public static final java.lang.String PARAM_UUID
public static final java.lang.String PARAM_FILTER
protected static final java.lang.String PROPERTY_text
protected static final java.lang.String PROPERTY_DOT_itemText
protected static final java.lang.String PROPERTY_Items
protected static final java.lang.String PROPERTY_innerText
protected static final java.lang.String PROPERTY_textContent
protected static final java.lang.String PROPERTY_innerHTML
protected static final java.lang.String TEST_DATA_SUFFIX
protected static final java.lang.String OBJECT_DATA
protected java.lang.String action
protected java.lang.String windowName
protected java.lang.String compName
protected java.lang.String mapname
protected DDGUIUtilities utils
protected java.util.Iterator<java.lang.String> iterator
protected java.lang.String altText
public static final java.lang.String RELATIVE_TO_SCREEN
public static final java.lang.String RELATIVE_TO_PARENT
protected void updateFromTestRecordData()
public boolean isSupportedRecordType(java.lang.String recordType)
isSupportedRecordType
in class Processor
recordType
- -- String text of record type to match (ignoring case).public java.util.Collection<java.lang.String> getAlternateParams()
getAlternateParams
in class Processor
protected void getHelpersWorker() throws SAFSException
SAFSException
protected void getHelpers() throws SAFSException
SAFSException
public java.lang.Integer convertNum(java.lang.String num)
num,
- String
(indexed from 1, 1 will be subtracted from the number before returned)protected java.awt.Point checkForCoord(java.util.Iterator<java.lang.String> iterator)
getComponentRectangle()
should be provided in subclass, component's width and
height are necessary to calculate the coordinate.iterator
- Iterator, whose next element is the coords parameter or map-referencecheckForCoord(String)
,
getComponentRectangle()
protected java.awt.Point checkForCoord(java.lang.String coordinate)
getComponentRectangle()
should be provided in subclass, component's width and
height are necessary to calculate the coordinate.coordinate
- String, either an AppMap reference, or (x;y) notationgetComponentRectangle()
public java.awt.Point convertCoords(java.lang.String coords)
Subclasses may override to convert alternative values, such as Row and Col values as is done in org.safs.rational.CFTable
coords,
- String x;y or x,y or Coords=x;y or Coords=x,ypublic java.awt.Polygon convertLine(java.lang.String coords)
coords,
- String x1;y1;x2;y2 or x1,y1,x2,y2 or Coords=x1;y1;x2;y2 or Coords=x1,y1,x2,y2public ComponentFunction.Window convertWindowPosition(java.lang.String windowPosition)
windowPosition
- String, window's position-size-status string; or a map reference for window's status string.protected java.lang.String lookupAppMapReference(java.lang.String referenceName)
referenceName
- protected java.awt.Point lookupAppMapCoordReference(java.lang.String referenceName)
referenceName,
- String, the reference name passed on to
method 'lookupAppMapReference' to lookup the coordinate string
from an AppMap. Then that value is passed on to convertCoords.protected java.awt.Polygon lookupAppMapLineReference(java.lang.String referenceName)
referenceName,
- String, the reference name passed on to
method 'lookupAppMapReference' to lookup the Line string
from an AppMap. Then that value is passed on to convertLine.protected java.lang.Integer lookupAppMapNumReference(java.lang.String referenceName)
referenceName,
- String, the reference name passed on to
method 'lookupAppMapReference' to lookup the number string from an AppMap. Then that
value is passed on to convertNum.public static ComponentFunction.Window ConvertWindowPosition(java.lang.String windowPosition)
windowPosition
- String, window's position-size-status stringprotected void restore() throws SAFSException
SAFSException
protected void _restore() throws SAFSException
SAFSException
protected void maximize() throws SAFSException
SAFSException
protected void _maximize() throws SAFSException
SAFSException
protected void minimize() throws SAFSException
SAFSException
protected void _minimize() throws SAFSException
SAFSException
protected void close() throws SAFSException
SAFSException
protected void _close() throws SAFSException
SAFSException
protected void setPosition() throws SAFSException
SAFSException
protected void _setPosition(java.awt.Point position) throws SAFSException
SAFSException
protected void _setSize(java.awt.Dimension size) throws SAFSException
SAFSException
protected void componentSuccessMessage(java.lang.String detail)
protected void issuePassedSuccess(java.lang.String comment)
protected void issuePassedSuccessUsing(java.lang.String using)
protected void componentFailureMessage(java.lang.String detail)
protected void componentExecutedFailureMessage(java.lang.String error)
error
- -- a error messageprotected void issueParameterCountFailure()
protected void issueParameterCountFailure(java.lang.String detail)
detail
- detail about specific missing params or command formatprotected void issueParameterValueFailure(java.lang.String paramName)
paramName
- -- the Name of the action parameter in error.protected void issueFileErrorFailure(java.lang.String filename)
protected void issueUnknownErrorFailure(java.lang.String cause)
protected java.awt.Rectangle deduceImageRect(java.lang.String subareaMapKey) throws SAFSException
subareaMapKey,
- String, the reference in Map file, represent the subarea;
or the subarea itself. The subares is defined as (x, y, width, height)
for example like (0, 0, %50, %90)SAFSException
lookupAppMapReference(String)
,
getComponentRectangle()
protected java.lang.String getPossibleMapItem(java.lang.String mapKey)
protected void action_getGuiImage() throws SAFSException
SAFSException
public static boolean getUUIDBoolean(java.lang.String parameter) throws java.lang.Exception
parameter
- to evaluatejava.lang.Exception
- if the parameter is bad or does NOT start with "UUID=" (case-insensitive).StringUtilities.convertBool(Object)
protected void action_verifyGuiImageToFile() throws SAFSException
SAFSException
protected boolean setRectVars(java.awt.Rectangle rect, java.lang.String varname)
rect
- Rectangle,varname
- String,public void setIterator(java.util.Iterator<java.lang.String> iterator)
protected boolean isClickAction(java.lang.String action)
action
- String, the action to handle.componentClick()
.componentClick()
protected void componentProcess()
protected void componentClick() throws SAFSException
SAFSException
protected void executeScript() throws SAFSException
SAFSException
protected void inputKeystrokes() throws SAFSException
SAFSException
protected void action_ComputedStyle(boolean verification) throws SAFSException
SAFSException
protected void closeWindow() throws SAFSException
SAFSException
protected void verifyPropertyContains() throws SAFSException
SAFSException
protected void verifyValueContains() throws SAFSException
SAFSException
protected void verifyValues() throws SAFSException
SAFSException
protected void hoverScreenLocation() throws SAFSException
SAFSException
protected void isPropertyExist() throws SAFSException
SAFSException
protected void clearAppMapCache() throws SAFSException
SAFSException
protected java.lang.String normalizeFileEncoding(java.lang.String encoding)
protected void verifyObjectDataToFile() throws SAFSException
SAFSException
protected void captureObjectDataToFile() throws SAFSException
SAFSException
protected void verifyFileToFile(boolean isTextFile) throws SAFSException
isTextFile,
- boolean, if true, then text files, else binary filesSAFSException
protected void guiDoesExist(boolean does) throws SAFSException
does
- boolean, true if hope the GUI exist; false hope not exist.SAFSException
protected void verifyPropertyToFile(boolean array) throws SAFSException
array
- boolean, if true, then array property, else scalarSAFSException
protected void verifyPropertiesToFile() throws SAFSException
SAFSException
protected void capturePropertyToFile() throws SAFSException
SAFSException
protected void capturePropertiesToFile() throws SAFSException
SAFSException
protected void verifyClipboardToFile() throws SAFSException
SAFSException
protected void hoverMouse() throws SAFSException
Parameters: CoordinationMapKey String, The offset from 'Uper-Left corner' of component, such as "20;40", or a mapKey defined under "ComponentName" or "ApplicationConstants" in map file. HoverTime int, milliseconds to hover support different format of test record: 1. T, ClassicCD, JavaTree, HoverMouse 2. T, ClassicCD, JavaMenu, HoverMouse, myCoord -- In this case myCoord should be defined in the 'JavaMenu' section of the Application Map File like this: -- [JavaMenu] -- myCoord="10,10" 3. T, ClassicCD, JavaMenu, HoverMouse, "10;10" 4. T, ClassicCD, JavaTree, HoverMouse, "10;10", 4000 5. T, ClassicCD, JavaMenu, HoverMouse, , 3000
SAFSException
protected void setPropertyValue() throws SAFSException
SAFSException
protected void performScorll() throws SAFSException
SAFSException
protected void selectMenuItem(boolean fuzzy) throws SAFSException
fuzzy,
- false: select the menu item that exactly matches the given pathSAFSException
protected void verifyMenuItem(boolean fuzzy) throws SAFSException
fuzzy,
- to do exactly match if false, otherwise do fuzzy matchSAFSException
protected void performDrag() throws SAFSException
SAFSException
protected void dragTo() throws SAFSException
SAFSException
protected void sendEvent() throws SAFSException
SAFSException
protected void action_GetSaveTextFromGUI() throws SAFSException
SAFSException
protected void locateScreenImage()
Parameters: VarName String, The root name of the collection of variables to receive the location and dimensions. WhomRelativeTo String, "screen" or "parent" T WindowName CompName LocateScreenImage VarName [WhomRelativeTo] [WhomRelativeTo]: relative to the screen or parentWindow default(not set): relative to the screen screen: relative to the screen parent: relative to the parent window locate the GUI if CompName in the GUI of WindowName and write the area to Varname variables set: varname=x y w h (space delimited) varname.x=x varname.y=y varname.w=w varname.h=h
protected void action_showOnPage() throws SAFSException
SAFSException
protected void clearCache() throws SAFSException
SAFSException
protected void waitForGUI() throws SAFSException
SAFSException
protected void verifyProperty() throws SAFSException
SAFSException
protected void assignPropertyVariable() throws SAFSException
SAFSException
protected int waitForObject(java.lang.String mapname, java.lang.String windowName, java.lang.String compName, int secii) throws SAFSException
SAFSException
public static java.util.Collection<java.lang.String> normalizePropertyCollection(java.util.Collection<java.lang.String> properties, java.lang.String encoding)
by calling this method, this value will be broke into several values according to those line breaks.StringUtils.CRLF
,StringUtils.CARRIAGE_RETURN
,StringUtils.NEW_LINE
,
properties
- Collection<String>, a collection of properties to normalizeencoding
- String, the encoding used to write and read a collection of propertiesgetPropertyCollection(List)
,
getPropertyCollection(String)
,
verifyPropertyToFile(boolean)
protected java.util.Collection<java.lang.String> getPropertyCollection(java.lang.String property) throws SAFSException
property
- String, the property nameSAFSException
protected java.util.Collection<java.lang.String> getPropertyCollection(java.util.List<java.lang.String> propertyList) throws SAFSException
propertyList
- List<String>, a list of property namesSAFSException
protected java.lang.String getStringValue(java.lang.Object value) throws SAFSException
SAFSException
protected java.lang.String getProperty(java.lang.String propertyName) throws SAFSException
propertyName
- String, property's nameSAFSException
protected java.util.Map<java.lang.String,java.lang.Object> getProperties() throws SAFSException
SAFSException
- "Not supported yet."protected java.lang.Object getPropertyObject(java.lang.String propertyName) throws SAFSException
SAFSException
- "Not supported yet."protected java.util.Collection<java.lang.String> captureObjectData() throws SAFSException
SAFSException
- "Not supported yet."protected java.awt.Rectangle getWindowRectangleOnScreen()
protected java.awt.Rectangle getComponentRectangleOnScreen()
protected boolean showComponentAsMuchPossible(boolean verify, boolean refresh) throws SAFSException
verify
- boolean, verify that the component is shown on page if verify is true.refresh
- boolean, the component may need to be refreshed after scrolling into view.SAFSException
- if some unexpected things happen.protected java.awt.Rectangle getComponentRectangle()
getRectangleImage(Rectangle)
SHOULD be overridden in subclass to provide appropriate implementation.
deduceImageRect(String)
to get a subarea rectangle.
deduceImageRect(String)
protected java.awt.image.BufferedImage getRectangleImage(java.awt.Rectangle imageRect) throws SAFSException
getComponentRectangle()
.imageRect
- Rectangle, within the rectangle to get image. SAFSException
getComponentRectangle()
,
deduceImageRect(String)
protected boolean exist() throws SAFSException
SAFSException
protected boolean performHoverMouse(java.awt.Point point, int milliseconds) throws SAFSException
point
- Point, coordinate relative to the component to hover at. null if hover the center.milliseconds
- int, time to hover, in millisecondsSAFSException
Copyright © SAS Institute. All Rights Reserved.