public class AbbotGUIUtilities extends DDGUIUtilities
Modifier and Type | Field and Description |
---|---|
protected static AServerImpl |
server
The RMI server used to control the RMI bridge that talks with the JVMAgents inserted
into every "enabled" Java JVM launched.
|
appmaps, DEBUG_MESSAGE, FAILED_MESSAGE, FAILED_OK_MESSAGE, GENERIC_MESSAGE, log, PASSED_MESSAGE, trdata, WARNING_MESSAGE, WARNING_OK_MESSAGE
staf
Constructor and Description |
---|
AbbotGUIUtilities()
No-argument constructor.
|
AbbotGUIUtilities(STAFHelper helper,
LogUtilities log)
Constructor providing the STAFHelper and LogUtilities needed for
proper operation.
|
AbbotGUIUtilities(STAFHelper helper,
TestRecordData data,
LogUtilities log)
Constructor providing the STAFHelper, LogUtilities, and TestRecordData for proper operation.
|
Modifier and Type | Method and Description |
---|---|
java.util.List |
extractListItems(java.lang.Object obj,
java.lang.String countProp,
java.lang.String itemProp)
Extract items from a List or Array type of object.
|
Tree |
extractMenuBarItems(java.lang.Object obj)
Extract a menu hierarchy from a MenuBar pseudo-object reference.
|
Tree |
extractMenuItems(java.lang.Object obj)
Extract a menu hierarchy from a object.
|
java.lang.Object |
findPropertyMatchedChild(java.lang.Object obj,
java.lang.String property,
java.lang.String bench,
boolean exactMatch)
Attempt to locate a child object based on a matching property value.
|
java.lang.String |
getListItem(java.lang.Object obj,
int i,
java.lang.String itemProp)
Get a single indexed item from a List or Array type of object.
|
static boolean |
hasLocalServer()
true if our RMI server is a valid instanceof LocalServer.
|
int |
setActiveWindow(java.lang.String appMapName,
java.lang.String windowName,
java.lang.String compName)
Attempts to "activate" or give focus to the specified window/object via the remote
AUT JVM proxies.
|
static void |
setLocalServer(LocalServer aserver)
Set the RMI server to use.
|
int |
waitForObject(java.lang.String appMapName,
java.lang.String windowName,
java.lang.String compName,
long secTimeout)
Uses the Application Map caching mechanism provided by the superclass.
|
clearAllAppMapCaches, clearAppMapCache, createAppMapInstance, getAppMap, getLogUtilities, getTestRecordData, isAppMapRegistered, openAppMap, registerAppMap, registerAppMap, setLogUtilities, setTestRecordData
getSTAFHelper, setSTAFHelper
protected static AServerImpl server
AServerImpl
,
JVMAgent
public AbbotGUIUtilities()
DDGUIUtilities.DDGUIUtilities()
public AbbotGUIUtilities(STAFHelper helper, LogUtilities log)
helper
- The STAFHelper for performing STAF requests.log
- the LogUtilities for logging.STAFHelper
,
LogUtilities
public AbbotGUIUtilities(STAFHelper helper, TestRecordData data, LogUtilities log)
helper
- The STAFHelper for performing STAF requests.data
- the TestRecordData generally an instanceof ATestRecordHelper.log
- the LogUtilities for logging.STAFHelper
,
ATestRecordHelper
,
LogUtilities
public static void setLocalServer(LocalServer aserver)
public static boolean hasLocalServer()
public int waitForObject(java.lang.String appMapName, java.lang.String windowName, java.lang.String compName, long secTimeout) throws SAFSObjectNotFoundException
waitForObject
in class DDGUIUtilities
appMapName
- the name/ID of the App Map currently in use.windowName
- the name/ID of the window as predefined in the App Map.compName
- the name/ID of the child component of the window as predefined
in the App Map.secTimeout
- the number of seconds allowed to located the object before a
SAFSObjectNotFoundException is thrown.SAFSObjectNotFoundException
- if specified parent or child cannot be found.DDGUIUtilities.waitForObject(String,String,String,long)
public int setActiveWindow(java.lang.String appMapName, java.lang.String windowName, java.lang.String compName) throws SAFSObjectNotFoundException
setActiveWindow
in class DDGUIUtilities
appMapName
- name of AppMap used to lookup component.windowName
- name of Window in AppMap.compName
- name of Window Component in AppMap.
If the Window IS the desired Component, then both windowName
and compName will be the same.SAFSObjectNotFoundException
- if the specified component cannot be found.DDGUIUtilities.setActiveWindow(String,String,String)
public java.util.List extractListItems(java.lang.Object obj, java.lang.String countProp, java.lang.String itemProp) throws SAFSException
extractListItems
in class DDGUIUtilities
obj
- AgentWindow reference to the remote component.countProp
- String property which will contain an Integer count of items available.itemProp
- String the property to retrieve from any non-String object received
as a List Item. For example, if we were to receive a TreeNode object for each item in
the List instead of a String we will then retrieve the value of the specified
itemProp property from each TreeNode and use that as the List Item value.SAFSException
DDGUIUtilities.extractListItems(Object,String,String)
public java.lang.String getListItem(java.lang.Object obj, int i, java.lang.String itemProp) throws SAFSException
getListItem
in class DDGUIUtilities
obj
- AgentWindow reference to the remote component.i
- int index into object list or array.itemProp
- String property which will contain the List or Array of itemsSAFSException
DDGUIUtilities.getListItem(Object,int,String)
,
AgentWindow
public Tree extractMenuBarItems(java.lang.Object obj) throws SAFSException
extractMenuBarItems
in class DDGUIUtilities
obj
- AgentWindow reference to the remote component.SAFSException
DDGUIUtilities.extractMenuBarItems(Object)
public Tree extractMenuItems(java.lang.Object obj) throws SAFSException
DDGUIUtilities
extractMenuItems
in class DDGUIUtilities
obj
- AgentWindow reference to the remote component.SAFSException
DDGUIUtilities.extractMenuItems(Object)
public java.lang.Object findPropertyMatchedChild(java.lang.Object obj, java.lang.String property, java.lang.String bench, boolean exactMatch) throws SAFSObjectNotFoundException
Uses StringUtils.isCaseContainsMatch
findPropertyMatchedChild
in class DDGUIUtilities
obj
- AgentWindow reference to the remote component.
property
- -- the property of each child that will be evaluated. The property is
expected to be a Value Property that can successfully return a value
cast as type String.
bench
- -- the benchmark value for the property to be used in comparisons.
exactMatch
- -- if true, an exact case-sensitive match of the bench value
provided is required to signal a match.SAFSObjectNotFoundException
DDGUIUtilities.findPropertyMatchedChild(Object,String,String,boolean)