org.safs.selenium
Class SGuiObjectRecognition

java.lang.Object
  extended byorg.safs.GuiObjectRecognition
      extended byorg.safs.selenium.SGuiObjectRecognition

public class SGuiObjectRecognition
extends GuiObjectRecognition

Part of the required implementation to support SAFS "standard" recognition strings. External users would normally not use this class directly.
Consequently, the API and associated data is subject to change without notice.

Since:
AUG 15, 2006

Nested Class Summary
 
Nested classes inherited from class org.safs.GuiObjectRecognition
GuiObjectRecognition.GORInfo
 
Field Summary
 
Fields inherited from class org.safs.GuiObjectRecognition
assignSeparator, CATEGORY_CLASS, CATEGORY_CLASS_ID, CATEGORY_JAVA_CLASS, CATEGORY_TYPE, CATEGORY_TYPE_ID, CATEGORY_UNKNOWN_ID, classCategory, classCategoryID, classInfo, classValue, containerNamesIgnoredForRecognition, containerTypes, containerTypesIgnoredForRecognition, containerTypesWithOnlyOneChildVisible, DEFAULT_ASSIGN_SEPARATOR, DEFAULT_CLOSE_CAPTION_EXPRESSION, DEFAULT_MATCH_ANY, DEFAULT_OPEN_CAPTION_EXPRESSION, DEFAULT_QUALIFIER_SEPARATOR, DEFUALT_PROPERTY_QUALIFIER_SEPARATOR, DhtmlElements, gorInfos, htmlElements, ignoreTypeChildren, linkHtmlElements, pathInfo, QUALIFIER_ABS_INDEX, QUALIFIER_ABS_INDEX_ID, QUALIFIER_CAPTION, QUALIFIER_CAPTION_ID, QUALIFIER_CLASS, 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 Summary
SGuiObjectRecognition(java.lang.String objectInfo)
          Standard Constructor
SGuiObjectRecognition(java.lang.String objectInfo, java.lang.String aQualifierSeparator)
          Constructor with Alternate Qualifier Separator
 
Method Summary
 java.lang.Object getMatchingPathObject(java.lang.Object theObject, java.lang.String thePath)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 java.lang.String getObjectCaption(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 java.lang.String getObjectClassName(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
 java.lang.String getObjectID(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 int getObjectLevel(java.lang.Object theObject)
          not yet implemented Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 java.lang.String getObjectName(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 java.lang.String getObjectProperty(java.lang.Object theObject, java.lang.String theProperty)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 java.lang.String getObjectText(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
 boolean isMatchingPath(java.lang.Object theObject, java.lang.String thePath)
          Used internally by GuiObjectRecognition superclass.
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.
Mechanism to simply forward this request on to the SGuiClassData.isMatched function.
 boolean isMatchingType(java.lang.Object theObject, java.lang.String theClass)
          Determine if the provided Object matches our segment of the recognition string.
 boolean isObjectShowing(java.lang.Object theObject)
          Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.
protected  void listProperties(java.lang.Object obj)
          Writes the list of object property names and current values to Log.debug output.
 
Methods inherited from class org.safs.GuiObjectRecognition
extractClassInfo, getClassCategory, getClassCategoryID, getClassRecognition, getClassValue, getMatchingObject, getObjectAccessibleName, getObjectRecognition, getQualifierCategory, getQualifierCategoryID, getQualifierCount, getQualifierIDValue, getQualifierRecognition, getQualifierSeparator, getQualifierValue, hasCategoryInfo, isContainerNameIgnoredForRecognition, isContainerType, isContainerTypeIgnoredForRecognition, isContainerTypeWithOnlyOneChildVisible, isDHtmlElement, isFinalMatch, isHtmlElement, isIgnoredTypeChild, isLinkHtmlElement, isMatchingCaption, isMatchingCaption, isMatchingClass, isMatchingClass, isMatchingID, isMatchingLevel, isMatchingName, isMatchingObject, isMatchingProperty, isMatchingQualifiers, isMatchingText, isTextOKForRecognition, isTopLevelContainer, makeRegexReadyWildcards, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SGuiObjectRecognition

public SGuiObjectRecognition(java.lang.String objectInfo)
Standard Constructor


SGuiObjectRecognition

public SGuiObjectRecognition(java.lang.String objectInfo,
                             java.lang.String aQualifierSeparator)
Constructor with Alternate Qualifier Separator

Method Detail

getObjectClassName

public java.lang.String getObjectClassName(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.

Specified by:
getObjectClassName in class GuiObjectRecognition
Returns:
String value of the requested object class name or null on error.

isMatchingType

public boolean isMatchingType(java.lang.Object theObject,
                              java.lang.String theClass)
Determine if the provided Object matches our segment of the recognition string. Primarily just forwards the call to SGuiClassData.getMappedClassType.

Specified by:
isMatchingType in class GuiObjectRecognition
Parameters:
theClass - information provided and forwarded to SGuiClassData.isMappedClassType.
Returns:
true if the class matches, or is a subclass of, the class specified in the recognition string. false if we cannot identify an appropriate match or an error occurs.

isMatchingSubClass

public boolean isMatchingSubClass(java.lang.Object theObject,
                                  java.lang.String theClass,
                                  java.lang.String parentClass)
Used internally by GuiObjectRecognition superclass.
Mechanism to simply forward this request on to the SGuiClassData.isMatched function.

Specified by:
isMatchingSubClass in class GuiObjectRecognition
Parameters:
theClass - information from GuiObjectRecognition and forwarded to SGuiClassData.isMatched.
parentClass - information provided and forwarded to SGuiClassData.isMatched.
Returns:
true if theObject is determined to satisfy the requested information.

isObjectShowing

public boolean isObjectShowing(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
isObjectShowing in class GuiObjectRecognition
Returns:
true if theObject was found to be "showing" or "visible".

getObjectCaption

public java.lang.String getObjectCaption(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
getObjectCaption in class GuiObjectRecognition
Returns:
String value of the requested object information or an empty string. Must not return a null value at this time.

getObjectName

public java.lang.String getObjectName(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
getObjectName in class GuiObjectRecognition
Returns:
String value of the requested object information or an empty string. Must not return a null value at this time.

getObjectLevel

public int getObjectLevel(java.lang.Object theObject)
not yet implemented Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information.

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.

Specified by:
getObjectLevel in class GuiObjectRecognition
Returns:
int value of the requested object information or -1.

getObjectText

public java.lang.String getObjectText(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
getObjectText in class GuiObjectRecognition
Returns:
String value of the requested object information or an empty string. Must not return a null value at this time.

getObjectID

public java.lang.String getObjectID(java.lang.Object theObject)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
getObjectID in class GuiObjectRecognition
Returns:
String value of the requested object information or an empty string. Must not return a null value at this time.

getObjectProperty

public java.lang.String getObjectProperty(java.lang.Object theObject,
                                          java.lang.String theProperty)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
getObjectProperty in class GuiObjectRecognition
Parameters:
theProperty - name of the property value to be evaluated in the object.
Returns:
String value of the requested object information or an empty string. Must not return a null value at this time.

getMatchingPathObject

public java.lang.Object getMatchingPathObject(java.lang.Object theObject,
                                              java.lang.String thePath)
Used internally by GuiObjectRecognition superclass.
Mechanism to provide the requested information. Retrieves the resulting object identified with the Path information applied to theObject.

Specified by:
getMatchingPathObject in class GuiObjectRecognition
Parameters:
thePath - information to locate another object or subitem relative to theObject. this is usually something like a menuitem or tree node where supported.
Returns:
Object child sub-object found relative to theObject

isMatchingPath

public boolean isMatchingPath(java.lang.Object theObject,
                              java.lang.String thePath)
Used internally by GuiObjectRecognition superclass.
Mechanism to determine the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Specified by:
isMatchingPath in class GuiObjectRecognition
Parameters:
thePath - information to locate another object or subitem relative to theObject. this is usually something like a menuitem or tree node where supported.
Returns:
true if the child sub-object was found relative to theObject.

listProperties

protected void listProperties(java.lang.Object obj)
Writes the list of object property names and current values to Log.debug output. Only works if the org.safs.Log is ENABLED which means the user/developer has an active debug Log running.