public class STAFLocalServer extends DriverConfiguredSTAFInterfaceClass implements LocalServer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RTYPE
'E'
|
(package private) static java.lang.String[] |
SEPS
Array of posibbl separators: "," "|" ":" ";" "_" "#" "!"
|
(package private) STAFProcessContainerHelper |
trd |
config, customStr, customText, debugStr, debugText, driver, DRIVER_TEMP_PROCESS, failedStr, failedText, genericStr, genericText, launchCount, log, machine, otherStr, otherText, passedStr, passedText, processName, running, SAFS_RESBUN_NAME, servicename, shutdownCount, staf, STAFPROC_EXE, warningStr, warningText, weStartedService, weStartedSTAF
Constructor and Description |
---|
STAFLocalServer() |
Modifier and Type | Method and Description |
---|---|
boolean |
clearHighlightedDialog() |
void |
enableDomains(java.lang.String domains) |
java.lang.String |
getAccessibleName(java.lang.Object object)
Retrieve the accessible name of the object if the object is named.
|
java.lang.String |
getCaption(java.lang.Object object)
Retrieve the Caption of the object if one exits.
|
int |
getChildCount(java.lang.Object parent)
Return the number of children available in the provided STAFProcessContainerResult parent.
|
java.lang.Object[] |
getChildren(java.lang.Object parent)
Return an array representing the children of the provided parent object.
|
java.lang.String |
getClassIndex(java.lang.Object object)
Retrieve the ClassIndex of the object if the object has an ClassIndex
|
java.lang.String |
getClassName(java.lang.Object object)
Return the Class name of the object.
|
java.awt.Rectangle |
getComponentRectangle(java.lang.Object winkey) |
java.lang.String |
getDomainName(java.lang.Object object)
Retrive the domain name of the object
|
java.lang.String |
getID(java.lang.Object object)
Retrieve the ID of the object if the object has an ID.
|
int |
getLevel(java.lang.Object object)
Return the Z-Order level of the object (generally for a top level window).
|
java.lang.Object[] |
getMatchingChildKeysAtPoint(java.lang.Object parentkey,
int x,
int y) |
java.lang.Object[] |
getMatchingChildObjects(java.lang.Object parent,
java.lang.String childRec)
Engine will attempt to locate a child object matching the
provided recognition string.
|
java.lang.Object |
getMatchingParentObject(java.lang.String winRec)
Engines will attempt to locate a top-level window object matching the
provided recognition string.
|
java.lang.Object |
getMatchingPathObject(java.lang.Object parent,
java.lang.String path)
Mechanism to retrieve a subitem/object identified
by the provided Path.
|
java.lang.String |
getName(java.lang.Object object)
Retrieve the name of the object if the object is named.
|
java.lang.String |
getNonAccessibleName(java.lang.Object object)
Retrieve the name (not including accessible name) of the object if the object is named.
|
java.lang.String |
getObjectRecognitionAtScreenCoords(int x,
int y) |
java.lang.String |
getProperty(java.lang.Object object,
java.lang.String property)
Retrieve the property value of the object if the object has the property.
|
java.lang.String[] |
getPropertyNames(java.lang.Object object)
The array of objects will be stored in the
trd.getStatusInfo() as a delimited array of fields.
|
java.lang.String[][] |
getStringData(java.lang.Object object,
java.lang.Object dataInfo)
Currently returns an empty 2D array.
|
java.lang.String[] |
getSuperClassNames(java.lang.Object object)
The array of objects will be stored in the
trd.getStatusInfo() as a delimited array of fields.
|
java.lang.String |
getText(java.lang.Object object)
Retrieve the displayed text value of the object if the object has a text value.
|
int |
getTopLevelCount()
Return the number of currently active Top Level Windows from
all known engines.
|
java.lang.Object[] |
getTopLevelWindows()
Return an array representing the TopLevel windows from all known engines.
|
long |
getTopWindowHandle(java.lang.Object key) |
static java.lang.String |
getUniqueSeparator(java.lang.String afield)
Return a usable single character separator string that does NOT exist
in the provided field.
|
boolean |
highlightMatchingChildObject(java.lang.String winRec,
java.lang.String ChildRec)
Engine will try to locate/highlight a window object matching the
provided recognition string (ChildRec) under the top-most window with R-String (winRec).
|
boolean |
highlightMatchingChildObjectByKey(java.lang.Object winkey,
java.lang.Object compkey,
java.lang.String rstring)
Engine will try to locate/highlight a window object by its key to the cached object
It is supported by RJ.
|
boolean |
isMatchingPath(java.lang.Object theObject,
java.lang.String thePath)
Currently always returns 'false'.
|
boolean |
isShowing(java.lang.Object object)
Return true if the object is showing/visible.
|
boolean |
isToolRunning()
Superclass implementation checks for a service.
|
boolean |
isTopLevelPopupContainer(java.lang.Object object)
Return true if the object is PopupWindow Container,
Some Java Frames and\or JFrames can contain a JPopup in a child
panel instead of an "owned" window.
|
boolean |
isValid(java.lang.Object object)
Return true if the object is still valid/finadable in the JVM.
|
void |
launchInterface(java.lang.Object configInfo)
Generic extraction of Driver, Config, and STAFHelper objects.
|
TestRecordData |
process(java.lang.Object object,
TestRecordData testRecordData)
Currently returns TestRecordData unmodified.
|
protected long |
processCommand(STAFProcessContainerHelper trd,
boolean allEngines)
Route the input record to available engines.
|
protected java.lang.String |
processStringMethod(java.lang.Object object,
java.lang.String command)
Generic routine to execute an engine command that takes no parameters and
is only to be executed by the specific EngineInterface stored in the
STAFProcessContainerResult.
|
void |
reset()
Reset or clear any cached information in the underlying tool or service.
|
protected long |
routeToEngines(STAFProcessContainerHelper trd,
boolean allEngines)
This command is normally only called internally by processCommand.
|
protected long |
routeToPreferredEngines(STAFProcessContainerHelper trd,
boolean allEngines)
This command is normally only called internally by processCommand.
|
void |
setActiveWindow(java.lang.Object anObject)
Attempts to set anObject as the active (topmost?) Window or Component.
|
configureJSTAFServiceEmbeddedJVMOption, extendedGenericMessage, finalize, getCoreInterface, getEmbeddedJVMBinPath, getSTAFHelper, logMessage, setLogUtilities, setLogUtilities, shutdown, shutdownService, simpleGenericMessage, simpleGenericSuccessMessage, simpleGenericWarningMessage, simpleSuccessMessage, simpleSuccessMessage, simpleSuccessUsingMessage, standardErrorMessage, waitForServiceStartCompletion
public static final java.lang.String RTYPE
STAFProcessContainerHelper trd
static final java.lang.String[] SEPS
public void launchInterface(java.lang.Object configInfo)
DriverConfiguredSTAFInterfaceClass
super.launchInterface(configInfo);
popuplates the driver, processName, config, and staf fields with valid objects. These items are properly unregistered/destroyed in the finalize() method.
launchInterface
in interface ConfigurableToolsInterface
launchInterface
in class DriverConfiguredSTAFInterfaceClass
configInfo
- can be whatever the final implementation needs it to be. This
might be a String with configuration information, the name of a class, or an instance
of some object used to provide configuration assets.DriverConfiguredSTAFInterfaceClass.launchInterface(Object)
public boolean isToolRunning()
isToolRunning
in interface GenericToolsInterface
isToolRunning
in class DriverConfiguredSTAFInterfaceClass
DriverConfiguredSTAFInterfaceClass.isToolRunning()
protected java.lang.String processStringMethod(java.lang.Object object, java.lang.String command)
object
- STAFProcessContainerResult object identifying one engine and component.command
- String engine command to execute.DriverConstant.SAFS_NULL
public boolean isTopLevelPopupContainer(java.lang.Object object)
object
- An object for to check PopupWindow.public void enableDomains(java.lang.String domains)
public int getTopLevelCount()
getTopLevelCount
in interface LocalServer
public java.lang.Object[] getTopLevelWindows()
getTopLevelWindows
in interface LocalServer
public void setActiveWindow(java.lang.Object anObject)
setActiveWindow
in interface LocalServer
anObject
- STAFProcessContainerResult provided by the engine identifying the object.public int getChildCount(java.lang.Object parent)
getChildCount
in interface LocalAgent
public java.lang.Object[] getChildren(java.lang.Object parent)
getChildren
in interface LocalAgent
parent
- A STAFProcessContainerResult object from getTopLevelWindows or from a previous call to getChildren.
The parent is often one of the elements of the TopLevelWindow array or somewhere
lower in that same hierarchy.public java.lang.String getCaption(java.lang.Object object)
getCaption
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getAccessibleName(java.lang.Object object)
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getNonAccessibleName(java.lang.Object object)
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getName(java.lang.Object object)
getName
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getID(java.lang.Object object)
getID
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getText(java.lang.Object object)
getText
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String[] getPropertyNames(java.lang.Object object)
getPropertyNames
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getClassIndex(java.lang.Object object)
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String getDomainName(java.lang.Object object)
object
- An object from getTopLevelWindows or from the a previous call to getChildrenpublic java.lang.String getProperty(java.lang.Object object, java.lang.String property)
getProperty
in interface LocalAgent
object
- -- An object from getTopLevelWindows or from a previous call to getChildren.property
- -- the case-sensitive name of the property to seek.public java.lang.String getClassName(java.lang.Object object)
getClassName
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public int getLevel(java.lang.Object object)
getLevel
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public boolean isShowing(java.lang.Object object)
isShowing
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public boolean isValid(java.lang.Object object)
isValid
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.String[] getSuperClassNames(java.lang.Object object)
getSuperClassNames
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.public java.lang.Object getMatchingPathObject(java.lang.Object parent, java.lang.String path)
Ex:
File->Exit
Root->Branch->Leaf
getMatchingPathObject
in interface LocalAgent
theObject--STAFProcessContainerResult
- object for the object to be evaluated.thePath
- information to locate another object or subitem relative to theObject.
this is usually something like a menuitem or tree node where supported.public java.lang.Object[] getMatchingChildKeysAtPoint(java.lang.Object parentkey, int x, int y)
parentkey,
- a String as the key to the cached object in Engine.x
- y
- public boolean isMatchingPath(java.lang.Object theObject, java.lang.String thePath) throws java.lang.Exception
isMatchingPath
in interface LocalAgent
thePath
- information to locate another object or subitem relative to theObject.
this is usually something like a menuitem or tree node where supported.java.lang.Exception
LocalAgent.isMatchingPath(java.lang.Object, java.lang.String)
public java.lang.String[][] getStringData(java.lang.Object object, java.lang.Object dataInfo)
getStringData
in interface LocalAgent
object
- An object from getTopLevelWindows or from a previous call to getChildren.dataInfo
- Allows us to specify what type of data we want returned. This will be
specific to the types of objects from which we extract data. For example, Tables might
provide "Contents" or "Headers" or other different types of data. This dataInfo is
usually provided as a String value.LocalAgent.getStringData(java.lang.Object, java.lang.Object)
public TestRecordData process(java.lang.Object object, TestRecordData testRecordData)
process
in interface LocalAgent
testRecordData
- provides all the information needed by the Agent to perform the action.LocalAgent.process(java.lang.Object, org.safs.TestRecordData)
public boolean highlightMatchingChildObject(java.lang.String winRec, java.lang.String ChildRec)
winRec,
- the recognition string of the top-most windowChildRec,
- the recognition string of the child windowpublic boolean highlightMatchingChildObjectByKey(java.lang.Object winkey, java.lang.Object compkey, java.lang.String rstring)
winkey,
- the key to cached test object for window in RJ enginecompkey,
- the key to cached test object for component in RJ enginerstring,
- the recognition string of the cached test objectpublic boolean clearHighlightedDialog()
public java.awt.Rectangle getComponentRectangle(java.lang.Object winkey)
winkey
- The cached key of the component's Test Objectpublic long getTopWindowHandle(java.lang.Object key)
key
- The key of window or component returned by engine side.public java.lang.Object getMatchingParentObject(java.lang.String winRec)
winRec
- String recognition string for Parent window object.public java.lang.Object[] getMatchingChildObjects(java.lang.Object parent, java.lang.String childRec)
parent
- STAFProcessContainerResult object identifying parent window previously retrieved.childRec
- String recognition string for desired child object.protected long routeToPreferredEngines(STAFProcessContainerHelper trd, boolean allEngines)
#processCommand(TestRecordHelper)
protected long routeToEngines(STAFProcessContainerHelper trd, boolean allEngines)
We will NOT route to an engine where isPreferredEngine==true since preferred engines would have already been tried.
#routeToPreferredEngines(TestRecordHelper)
,
#processCommand(TestRecordHelper)
protected long processCommand(STAFProcessContainerHelper trd, boolean allEngines)
Try preferred engines first, then try any remaining engines.
#routeToPreferredEngines(TestRecordHelper,boolean)
,
#routeToEngines(TestRecordHelper,boolean)
public static java.lang.String getUniqueSeparator(java.lang.String afield)
afield
- String field to keep intact.public void reset()
GenericToolsInterface
reset
in interface GenericToolsInterface
GenericToolsInterface.reset()
public java.lang.String getObjectRecognitionAtScreenCoords(int x, int y)
Copyright © SAS Institute. All Rights Reserved.