public class RGuiObjectRecognition extends GuiObjectRecognition
Rational specific implementation for storing and comparing GuiTestObjects a\ against generic recognition strings.
To effectively support "CurrentWindow" recognition strings we now have the need for JNA: Java Native Access
GuiObjectRecognition.GORInfo
Modifier and Type | Field and Description |
---|---|
(package private) static RGuiClassData |
classdata |
_convert_NBSP_Strings, assignSeparator, CATEGORY_CLASS, CATEGORY_CLASS_ID, CATEGORY_CURRENTWINDOW, CATEGORY_CURRENTWINDOW_ID, CATEGORY_DOMAIN, CATEGORY_DOMAIN_ID, CATEGORY_JAVA_CLASS, CATEGORY_PROCESS, CATEGORY_PROCESS_ID, CATEGORY_TYPE, CATEGORY_TYPE_ID, CATEGORY_UNKNOWN_ID, categoryIndex, classCategory, classCategoryID, classInfo, classValue, containerClassesIgnoredForRecognition, containerNamesIgnoredForRecognition, containerTypes, containerTypesIgnoredForRecognition, containerTypesWithOnlyOneChildVisible, DEFAULT_ASSIGN_SEPARATOR, DEFAULT_CLOSE_CAPTION_EXPRESSION, DEFAULT_MATCH_ANY, DEFAULT_OPEN_CAPTION_EXPRESSION, DEFAULT_PATH_SEPARATOR, DEFAULT_PROPERTY_QUALIFIER_SEPARATOR, DEFAULT_QUALIFIER_SEPARATOR, DhtmlElements, domainInfo, domainValue, gorInfos, govLevel, htmlElements, ignoreTypeChildren, linkHtmlElements, NBSP_STRING, pathInfo, processInfo, processValue, QUALIFIER_ABS_INDEX, QUALIFIER_ABS_INDEX_ID, QUALIFIER_CAPTION, QUALIFIER_CAPTION_ID, QUALIFIER_CLASS, QUALIFIER_CLASS_CONTAINS, QUALIFIER_CLASS_ID, QUALIFIER_CLASS_INDEX, QUALIFIER_CLASS_INDEX_ID, QUALIFIER_HTMLID, QUALIFIER_HTMLID_ID, QUALIFIER_HTMLTEXT, QUALIFIER_HTMLTEXT_ID, QUALIFIER_HTMLTITLE, QUALIFIER_HTMLTITLE_ID, QUALIFIER_ID, QUALIFIER_ID_ID, QUALIFIER_INDEX, QUALIFIER_INDEX_ID, QUALIFIER_JAVA_CLASS, QUALIFIER_JAVACAPTION, QUALIFIER_JAVACAPTION_ID, QUALIFIER_LEVEL, QUALIFIER_LEVEL_ID, QUALIFIER_NAME, QUALIFIER_NAME_CONTAINS, QUALIFIER_NAME_CONTAINS_ID, QUALIFIER_NAME_ID, QUALIFIER_OBJECT_INDEX, QUALIFIER_OBJECT_INDEX_ID, QUALIFIER_PATH, QUALIFIER_PATH_ID, QUALIFIER_PROPERTY, QUALIFIER_PROPERTY_CONTAINS, QUALIFIER_PROPERTY_CONTAINS_ID, QUALIFIER_PROPERTY_ID, QUALIFIER_TEXT, QUALIFIER_TEXT_ID, QUALIFIER_UNKNOWN_ID, qualifierInfo, qualifierMatches, qualifierSeparator, textOKForRecognition, topLevelContainers
Constructor and Description |
---|
RGuiObjectRecognition(java.lang.String objectInfo,
Script script,
int govLevel)
Standard Constructor
|
RGuiObjectRecognition(java.lang.String objectInfo,
java.lang.String aQualifierSeparator,
int govLevel,
Script script)
Constructor with Alternate Qualifier Separator
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCaption(TestObject obj) |
static java.lang.String |
getClassIndex(TestObject obj) |
protected java.util.List |
getDotNetSuperClassNames(TestObject theObject) |
protected java.util.List |
getFlexSuperClassNames(TestObject theObject) |
static java.lang.String |
getID(TestObject obj) |
protected java.util.List |
getJavaSuperClassNames(TestObject theObject) |
java.lang.Object |
getMatchingPathObject(java.lang.Object theObject,
java.lang.String thePath)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
static java.lang.String |
getName(TestObject obj)
08.29.2006 - Bob Lawler - With the addition of getObjectAccessibleName(), it's no longer necessary
to check for accessibleName here.
|
java.lang.String |
getObjectAccessibleName(java.lang.Object obj)
Allow individual engines (ie.
|
java.lang.String |
getObjectCaption(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String |
getObjectClassIndex(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String |
getObjectClassName(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String |
getObjectDomain(java.lang.Object theObject)
Used internally or by subclasses only.
|
java.lang.String |
getObjectID(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
int |
getObjectLevel(java.lang.Object theObject)
not yet implemented
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String |
getObjectName(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String |
getObjectProperty(java.lang.Object theObject,
java.lang.String theProperty)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
java.lang.String[] |
getObjectPropertyNames(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. |
java.lang.String[] |
getObjectSuperClassNames(java.lang.Object anObject)
Used internally, or by direct subclasses.
Subclasses using proxies must override with a tool-dependent mechanism to provide the requested information. |
java.lang.String |
getObjectText(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
static java.lang.String |
getText(TestObject obj) |
static java.lang.String |
getUIClassID(TestObject obj) |
boolean |
isMatchingPath(java.lang.Object theObject,
java.lang.String thePath)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to determine the requested information. |
boolean |
isMatchingSubClass(java.lang.Object theObject,
java.lang.String theClass,
java.lang.String parentClass)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to simply forward this request on to the RGuiClassData.isMatched function after casting the object to the appropriate class. |
boolean |
isMatchingType(java.lang.Object theObject,
java.lang.String theClass)
Determine if the provided GuiTestObject matches our segment of the
recognition string.
|
boolean |
isObjectShowing(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Rational RobotJ mechanism to provide the requested information. |
static boolean |
isObjectShowing(TestObject obj) |
static boolean |
isObjectVisible(TestObject obj) |
static boolean |
isTopLevelWindow(TestObject obj) |
static boolean |
isVisiblePropertyTrue(TestObject testobj,
java.lang.String visibleProp) |
protected void |
listAllProperties(TestObject obj,
java.lang.String str) |
protected void |
listMethods(TestObject obj) |
protected void |
listNonValueProperties(TestObject obj) |
protected void |
listProperties(TestObject obj) |
compareText, extractClassInfo, getClassCategory, getClassCategoryID, getClassRecognition, getClassValue, getDomainValue, getGovLevel, getMatchingObject, getObjectRecognition, getProcessValue, getQualifierCategory, getQualifierCategoryID, getQualifierCount, getQualifierIDValue, getQualifierRecognition, getQualifierSeparator, getQualifierValue, hasCategoryInfo, hasDomainInfo, hasProcessInfo, initDomainInfo, isContainerClassIgnoredForRecognition, isContainerNameIgnoredForRecognition, isContainerType, isContainerTypeIgnoredForRecognition, isContainerTypeWithOnlyOneChildVisible, isDHtmlElement, isFinalMatch, isHtmlElement, isIgnoredTypeChild, isLinkHtmlElement, isMatchingCaption, isMatchingCaption, isMatchingClass, isMatchingClass, isMatchingID, isMatchingLevel, isMatchingName, isMatchingObject, isMatchingProperty, isMatchingQualifiers, isMatchingText, isTextOKForRecognition, isTopLevelContainer, makeRegexReadyWildcards, toString
static RGuiClassData classdata
public RGuiObjectRecognition(java.lang.String objectInfo, Script script, int govLevel)
public RGuiObjectRecognition(java.lang.String objectInfo, java.lang.String aQualifierSeparator, int govLevel, Script script)
public java.lang.String getObjectClassName(java.lang.Object theObject)
getObjectClassName
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy for the object to be evaluated.public java.lang.String[] getObjectSuperClassNames(java.lang.Object anObject)
GuiObjectRecognition
getObjectSuperClassNames
in class GuiObjectRecognition
theObject--sometimes
- a tool-dependent proxy for the object to be evaluated.protected java.util.List getDotNetSuperClassNames(TestObject theObject)
theObject
- A proxy object that represents the object to be testedprotected java.util.List getJavaSuperClassNames(TestObject theObject)
theObject
- A proxy object that represents the object to be testedprotected java.util.List getFlexSuperClassNames(TestObject theObject)
theObject
- A proxy object that represents the FlexObjectTestObject to be testedpublic boolean isMatchingType(java.lang.Object theObject, java.lang.String theClass)
isMatchingType
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy of the actual object to be compared against our
recognition string.theClass
- information provided and forwarded to RGuiClassData.isMappedClassType.public boolean isMatchingSubClass(java.lang.Object theObject, java.lang.String theClass, java.lang.String parentClass)
isMatchingSubClass
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy for the object to be evaluated.theClass
- information from GuiObjectRecognition and forwarded
to RGuiClassData.isMatched.parentClass
- information provided and forwarded to
RGuiClassData.isMatched.public boolean isObjectShowing(java.lang.Object theObject)
isObjectShowing
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy for the object to be evaluated.public java.lang.String getObjectCaption(java.lang.Object theObject)
getObjectCaption
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy for the object to be evaluated.public java.lang.String getObjectDomain(java.lang.Object theObject)
getObjectDomain
in class GuiObjectRecognition
theObject
- -- usually a tool-dependent proxy for the object to be evaluated.public java.lang.String getObjectName(java.lang.Object theObject)
getObjectName
in class GuiObjectRecognition
theObject--GuiTestObject
- proxy for the object to be evaluated.public java.lang.String getObjectAccessibleName(java.lang.Object obj)
GuiObjectRecognition
getObjectAccessibleName
in class GuiObjectRecognition
public int getObjectLevel(java.lang.Object theObject)
Level is considered to be the Z-Order--often of top level window objects-- of components on the desktop or in a container. The highest Level is Level=1, and this usually indicates the item is visible and forefront. The next Level is Level=2, and so on.
The information is used to determine if a particular object is a match for our stored recognition information.
getObjectLevel
in class GuiObjectRecognition
theObject--TestObject
- proxy for the object to be evaluated.public java.lang.String getObjectText(java.lang.Object theObject)
getObjectText
in class GuiObjectRecognition
theObject--TestObject
- proxy for the object to be evaluated.public java.lang.String getObjectID(java.lang.Object theObject)
getObjectID
in class GuiObjectRecognition
theObject--TestObject
- proxy for the object to be evaluated.public java.lang.String[] getObjectPropertyNames(java.lang.Object theObject)
getObjectPropertyNames
in class GuiObjectRecognition
theObject--usually
- a tool-dependent proxy for the object to be evaluated.public java.lang.String getObjectProperty(java.lang.Object theObject, java.lang.String theProperty)
getObjectProperty
in class GuiObjectRecognition
theObject--TestObject
- proxy for the object to be evaluated.theProperty
- name of the property value to be evaluated in the object.public java.lang.Object getMatchingPathObject(java.lang.Object theObject, java.lang.String thePath)
getMatchingPathObject
in class GuiObjectRecognition
theObject--StatelessGuiSubitemTestObject
- proxy 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 boolean isMatchingPath(java.lang.Object theObject, java.lang.String thePath)
isMatchingPath
in class GuiObjectRecognition
theObject--StatelessGuiSubitemTestObject
- proxy 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.protected void listAllProperties(TestObject obj, java.lang.String str)
protected void listProperties(TestObject obj)
protected void listNonValueProperties(TestObject obj)
protected void listMethods(TestObject obj)
public static boolean isObjectVisible(TestObject obj)
public static boolean isVisiblePropertyTrue(TestObject testobj, java.lang.String visibleProp) throws PropertyNotFoundException
PropertyNotFoundException
public static boolean isObjectShowing(TestObject obj)
public static java.lang.String getUIClassID(TestObject obj)
public static boolean isTopLevelWindow(TestObject obj)
public static java.lang.String getCaption(TestObject obj)
public static java.lang.String getText(TestObject obj)
public static java.lang.String getName(TestObject obj)
public static java.lang.String getID(TestObject obj)
public java.lang.String getObjectClassIndex(java.lang.Object theObject)
getObjectClassIndex
in class GuiObjectRecognition
theObject--TestObject
- proxy for the object to be evaluated.public static java.lang.String getClassIndex(TestObject obj)
Copyright © SAS Institute. All Rights Reserved.