public class RGuiObjectVector extends GuiObjectVector
FlexUtil.getChildren(TestObject)
Lei Wang Nov 05, 2008 Modified method getChildren(): If there are some problems on AUT itself (for example, if the AUT
contains null pointer), the RFT WrappedException will be thrown. At this situation
I catch the exception and let our program continue to work. This modification will
cause some branchs not to be processed if the root node of that branch contains this
kind of problem. See defect S0543032.
Lei Wang Nov 07, 2008 Added method addTopWindowsFromDomainToWindowList().
Modified method getParentObjects(): Move some codes to new added method addTopWindowsFromDomainToWindowList().
Modified method getParentsByDomainName(): When add top windows to a List parents, use method
addTopWindowsFromDomainToWindowList() instead of DynamicEnabler.getRootTestObjectWindows()
Lei Wang Nov 11, 2008 Modified method getParentsByDomainName(): add also those top windows got from DynamicEnabler.getRootTestObjectWindows() if
we are seeking for a popupmenu.
Lei Wang Nov 20, 2008 Modified method getParentsByDomainName(): If we enable SWT domain and DOTNET domain the same time. Both of them will be enabled dynamically,
in our program the top windows of SWT domain will be put to a List firstly, so these windows and
windows owned by them (win.getOwnedObjects()) will be compared with the given RS 'Type=Window;Caption={List*}'.
And one of these windows match our RS.
I guess a DOTNET window has two views for RFT one is under DOTNET domain, the other is under SWT domain.
The view under DOTNET domain is what we want.
Enable DotNet domain before Swt doamin. See defect S0549176
JunwuMa Dec 15, 2008 For supporting Flex in the migration from RFT7 to RFT8, modified getChildren(TestObject), removed the call that is
used to eliminate the duplicate in Flex object's children. RFT8 enhances its API getChildren that supports Flex object well.
Carl Nagle Jun 04, 2009 Updates with DynamicEnabler and JNA to catch some RFT hangs.
Carl Nagle Aug 07, 2009 Updates with DynamicEnabler to enable only a specific process with Process=.
JunwuMa SEP 04, 2009 Update getChildren(TestObject) to support mapped class search mode.
JunwuMa OCT 26, 2009 Added method getCachedKeysByValue(Object) to get keys in Hashtable cache by value.
Lei Wang AUG 13, 2013 Modify method getParentsByDomainName() and addTopWindowsFromDomainToWindowList() to catch UserStoppedScriptError.Modifier and Type | Field and Description |
---|---|
protected static java.util.Vector |
bannedWinMailslots |
(package private) static RGuiClassData |
classdata |
static java.lang.String |
DEFAULT_ACTIVEX_DOMAIN_NAME |
static java.lang.String |
DEFAULT_FLEX_DOMAIN_NAME |
static java.lang.String |
DEFAULT_HTML_DOMAIN_NAME |
static java.lang.String |
DEFAULT_JAVA_DOMAIN_NAME |
static java.lang.String |
DEFAULT_NET_DOMAIN_NAME |
static java.lang.String |
DEFAULT_SWT_DOMAIN_NAME |
static java.lang.String |
DEFAULT_WIN_DOMAIN_NAME |
(package private) DomainTestObject |
domain
Must be set by getTopTestObject prior to any call to getMatchingParentObject().
|
ACTIVE_WINDOW_REFERENCE, cache, childName, childSeparator, DEFAULT_CHILD_SEPARATOR, DESKTOP_REFERENCE, DOTNET_POPUPMENU, FULLPATH_SEARCH_MODE_PREFIX, GENERIC_OBJECTTYPE_POPUPWINDOW, INITIAL_CACHE_SIZE, isFullPathSearchString, isMappedClassSearchString, isRftFindSearchString, MAPPEDCLASS_SEARCH_MODE_PREFIX, MODE_ENGINE_PROCESSING, MODE_EXTERNAL_PROCESSING, OBJECTTYPE_POPUPCONTAINER, OBJECTTYPE_POPUPMENU, OBJECTTYPE_POPUPWINDOW, path, pathVector, process_mode, PROPERTYALL_SEARCH_MODE_PREFIX, propertyAllSearchMode, recognitionStringPrefixes, RFT_FIND_SEARCH_MODE_PREFIX, SIMPLETYPE_POPUPMENU, WIN_POPUPMENU, windowName
Constructor and Description |
---|
RGuiObjectVector()
Calls the minimal RGuiObjectVector constructor.
|
RGuiObjectVector(java.lang.String window,
java.lang.String child,
java.lang.String pathString)
Calls the RGuiObjectVector constructor.
|
RGuiObjectVector(java.lang.String window,
java.lang.String child,
java.lang.String pathString,
Script script)
Calls the GuiObjectVector constructor and then initGuiObjectRecognition().
|
Modifier and Type | Method and Description |
---|---|
protected java.util.ArrayList |
addTopWindowsFromDomainToWindowList(DomainTestObject domain,
java.util.ArrayList windowList)
Note: This method will add the top windows of a domain and also
the owned windows by these top windows.
|
GuiChildIterator |
createGuiChildIterator(java.util.List gather)
Provide our RGuiChildIterator instance as required.
|
GuiChildIterator |
createGuiChildIterator(java.lang.Object aparent,
GuiObjectVector govVector,
java.util.List gather)
Provide our RGuiChildIterator instance as required.
|
GuiObjectRecognition |
createGuiObjectRecognition(java.lang.String subpath,
int govLevel)
Provide our RGuiObjectRecognition instance as required during initialization.
|
protected DomainTestObject[] |
deduceValidDomains(DomainTestObject[] domains)
Attempts to remove WIN domains that are likely bad associations with other domains like NET
and, maybe, HTML.
|
protected java.lang.Object |
getCachedItem(java.lang.Object key)
Attempts to retrieve an item from cache using the provided key.
|
java.util.ArrayList |
getCachedKeysByValue(java.lang.Object item)
Retrieve keys from the cache using a value item.
|
java.lang.Object[] |
getChildObjects(java.lang.Object parent)
Return an array representing all known window objects.
|
RGuiObjectRecognition |
getChildRecognition(int index)
Casts the GuiObjectRecognition from getChildGuiObjectRecognition to
our subclass.
|
TestObject |
getChildTestObject(TestObject aparent,
java.util.List gather)
get matching child TestObject for this RGuiObjectVector.
|
java.lang.Object[] |
getDomainParentObjects(java.lang.String domainname)
Return an array representing all known window objects in the specified domain.
|
GuiClassData |
getGuiClassData()
Return our RGuiClassData subclass as required.
|
java.lang.Object |
getMatchingParentObject()
Tries to see if we have an RFT Mapped Object before doing the standard search.
|
java.lang.Object[] |
getParentObjects()
Return an array representing all known window objects.
|
protected java.util.ArrayList |
getParentsByDomainName(java.util.ArrayList parents,
java.lang.String domainname)
Retrieve ALL parent objects from ALL domains matching the given domainname.
|
Script |
getScript()
Return the constructor-stored Script object.
|
TestObject |
getTopTestObject()
Find the one parent object that matches the recognition string set by setPathVector(String).
|
TestObject |
getTopTestObject(DomainTestObject domain)
Call this routine instead of getMatchingParentObject() directly.
|
static boolean |
isActiveXDomain(TestObject tobj) |
static boolean |
isBannedWinDomain(DomainTestObject domain)
return true if bannedWinMailslots contains this domains mailslot id.
|
static boolean |
isDotnetDomain(TestObject tobj) |
static boolean |
isFlexDomain(TestObject tobj) |
static boolean |
isHtmlDomain(TestObject tobj) |
static boolean |
isJavaDomain(TestObject tobj) |
protected boolean |
isOwnerSameTestContext(TestObject owner,
TestObject owned) |
static boolean |
isSwtDomain(TestObject tobj) |
boolean |
isValidGuiContainer(java.lang.Object object)
Return true if the object is a gui container.
|
boolean |
isValidGuiObject(java.lang.Object object)
Return true if the object is a GuiTestObject.
|
static boolean |
isWinDomain(TestObject tobj) |
void |
setActiveWindow(java.lang.Object _comp)
Make the Window referenced by _comp the active window.
|
void |
setScript(Script script)
Required when alternate constructors are used.
|
convertToKeys, getChildGuiObjectRecognition, getChildMatchData, getChildName, getFinalChildGuiObjectRecognition, getGuiObjectType, getMatchingChildObject, getParentGuiObjectRecognition, getPathVector, getProcessMode, getRecognitionDepth, getVectorString, getWindowName, initGuiObjectRecognition, isFullPathSearchMode, isMappedClassSearchMode, isMatchingParent, isMode, isPASMMode, isPropertyAllSearchMode, isRftFindSearchMode, isSeekingPopupMenu, isTopLevelPopupContainer, isTopLevelPopupWindow, iterateChildMatchData, iterateChildren, makeUniqueCacheKey, putCachedItem, removeCachedItem, removeRStringPrefixes, resetExternalModeCache, setChildName, setFullPathSearchMode, setMappedClassSearchMode, setPathVector, setProcessMode, setPropertyAllSearchMode, setRftFindSearchMode, setWindowName
public static final java.lang.String DEFAULT_JAVA_DOMAIN_NAME
public static final java.lang.String DEFAULT_HTML_DOMAIN_NAME
public static final java.lang.String DEFAULT_WIN_DOMAIN_NAME
public static final java.lang.String DEFAULT_NET_DOMAIN_NAME
public static final java.lang.String DEFAULT_SWT_DOMAIN_NAME
public static final java.lang.String DEFAULT_FLEX_DOMAIN_NAME
public static final java.lang.String DEFAULT_ACTIVEX_DOMAIN_NAME
protected static java.util.Vector bannedWinMailslots
deduceValidDomains
static RGuiClassData classdata
DomainTestObject domain
public RGuiObjectVector()
public RGuiObjectVector(java.lang.String window, java.lang.String child, java.lang.String pathString)
window
- child
- pathString
- script
,
GuiObjectVector.initGuiObjectRecognition()
,
GuiObjectVector.GuiObjectVector(String, String, String)
,
GuiObjectVector.initGuiObjectRecognition()
public RGuiObjectVector(java.lang.String window, java.lang.String child, java.lang.String pathString, Script script)
window
- child
- pathString
- script
- GuiObjectVector.GuiObjectVector(String, String, String)
,
GuiObjectVector.initGuiObjectRecognition()
public void setScript(Script script)
script
- public GuiChildIterator createGuiChildIterator(java.lang.Object aparent, GuiObjectVector govVector, java.util.List gather)
createGuiChildIterator
in class GuiObjectVector
aparent
- is NOT a cached key, but should be the actual
engine-specific object that should have already been retrieved from
internal cache if MODE_EXTERNAL_PROCESSING.GuiObjectVector.createGuiChildIterator(Object, GuiObjectVector, List)
public GuiChildIterator createGuiChildIterator(java.util.List gather)
createGuiChildIterator
in class GuiObjectVector
GuiObjectVector.createGuiChildIterator(List)
public GuiObjectRecognition createGuiObjectRecognition(java.lang.String subpath, int govLevel)
createGuiObjectRecognition
in class GuiObjectVector
GuiObjectVector#createGuiObjectRecognition(String)
public GuiClassData getGuiClassData()
getGuiClassData
in class GuiObjectVector
public Script getScript()
public RGuiObjectRecognition getChildRecognition(int index)
public static boolean isBannedWinDomain(DomainTestObject domain)
protected DomainTestObject[] deduceValidDomains(DomainTestObject[] domains)
domains[]
- protected java.util.ArrayList getParentsByDomainName(java.util.ArrayList parents, java.lang.String domainname)
domainname
- String name of the domain type (like "Java") to
retrieve.public java.lang.Object getMatchingParentObject()
getMatchingParentObject
in class GuiObjectVector
public java.lang.Object[] getParentObjects()
getParentObjects
in class GuiObjectVector
GuiObjectVector.getParentObjects()
,
GuiObjectVector.getProcessMode()
,
GuiObjectVector.convertToKeys(Object[])
public java.lang.Object[] getDomainParentObjects(java.lang.String domainname)
getDomainParentObjects
in class GuiObjectVector
domainname
- should be one of the supported org.safs.Domains constants like
"Java", "Html", "Win", etc..GuiObjectVector.getDomainParentObjects(String)
,
GuiObjectVector.getProcessMode()
,
GuiObjectVector.convertToKeys(Object[])
protected boolean isOwnerSameTestContext(TestObject owner, TestObject owned)
protected java.util.ArrayList addTopWindowsFromDomainToWindowList(DomainTestObject domain, java.util.ArrayList windowList)
domain
- An ojbect of class DomainTestObject which represents Java, Html, Net,Win ect.windowList
- A List contains those found windowspublic java.lang.Object[] getChildObjects(java.lang.Object parent)
getChildObjects
in class GuiObjectVector
parent
- - will convert from key if MODE_EXTERNAL_PROCESSINGGuiObjectVector.convertToKeys(Object[])
,
GuiObjectVector.makeUniqueCacheKey(Object)
,
GuiObjectVector.putCachedItem(Object, Object)
,
GuiObjectVector.getCachedItem(Object)
public boolean isValidGuiObject(java.lang.Object object)
isValidGuiObject
in class GuiObjectVector
object
- - will convert from key if MODE_EXTERNAL_PROCESSING.GuiObjectVector.isValidGuiObject(Object)
public boolean isValidGuiContainer(java.lang.Object object)
isValidGuiContainer
in class GuiObjectVector
object
- - will convert from key if MODE_EXTERNAL_PROCESSING.GuiObjectVector.isValidGuiContainer(Object)
public TestObject getTopTestObject(DomainTestObject domain)
It also casts the returned object to GuiTestObject--a subclass of TestObject.
GuiObjectVector.getMatchingParentObject()
,
GuiTestObject
public TestObject getTopTestObject()
getTopTestObject(DomainTestObject)
public TestObject getChildTestObject(TestObject aparent, java.util.List gather)
aparent,
- TestObjectgather,
- java.util.ListGuiObjectVector.getMatchingChildObject(Object, List)
,
GuiObjectVector.getCachedItem(Object)
public void setActiveWindow(java.lang.Object _comp)
GuiObjectVector
setActiveWindow
in class GuiObjectVector
_comp
- is expected to be of type Interface ITopWindowGuiObjectVector.setActiveWindow(java.lang.Object)
public static boolean isJavaDomain(TestObject tobj)
public static boolean isDotnetDomain(TestObject tobj)
public static boolean isHtmlDomain(TestObject tobj)
public static boolean isActiveXDomain(TestObject tobj)
public static boolean isWinDomain(TestObject tobj)
public static boolean isSwtDomain(TestObject tobj)
public static boolean isFlexDomain(TestObject tobj)
protected java.lang.Object getCachedItem(java.lang.Object key)
GuiObjectVector
getCachedItem
in class GuiObjectVector
key
- Object to use as lookup reference into cacheGuiObjectVector.makeUniqueCacheKey(Object)
,
GuiObjectVector.putCachedItem(Object, Object)
,
GuiObjectVector.removeCachedItem(Object)
public java.util.ArrayList getCachedKeysByValue(java.lang.Object item)
item,
- a cached TestObject for being looked up in cache.GuiObjectVector.makeUniqueCacheKey(Object)
,
GuiObjectVector.putCachedItem(Object, Object)
,
GuiObjectVector.removeCachedItem(Object)
Copyright © SAS Institute. All Rights Reserved.