IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester Proxy SDK Reference

Project Version 2.3

com.rational.test.ft.domain
Class ProxyTestObject

java.lang.Object   extended by com.rational.test.ft.sys.RegisteredObject       extended by com.rational.test.ft.domain.ProxyTestObject
All Implemented Interfaces:
IChannelObject, IDataDriven, IProxyBase
Direct Known Subclasses:
DescribedObject, DescribedObjectReference, DomainProxy, JavaProxy

public abstract class ProxyTestObject
extends com.rational.test.ft.sys.RegisteredObject
implements IProxyBase, IDataDriven

The true base class for all Java Proxy classes. This class specification deals with properties that are associated with an object. There are four categories of properties:

Since:
RFT1.0

Field Summary
static java.lang.String BROWSERTABTESTOBJECT_CLASSNAME
           
static java.lang.String BROWSERTESTOBJECT_CLASSNAME
           
static java.lang.String COLORDIALOGTESTOBJECT_CLASSNAME
           
static java.lang.String CROSSDOMAINCONTAINER_CLASSNAME
           
protected static com.rational.test.ft.util.FtDebug debug
           
static java.lang.String DOCUMENTTESTOBJECT_CLASSNAME
           
static java.lang.String DOMAINTESTOBJECT_CLASSNAME
           
static java.lang.String ECLIPSETOPLEVELTESTOBJECT_CLASSNAME
           
static java.lang.String EMBEDDEDBROWSERTESTOBJECT_CLASSNAME
           
static java.lang.String FILEDIALOGTESTOBJECT_CLASSNAME
           
static java.lang.String FRAMESUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String FRAMETESTOBJECT_CLASSNAME
           
static java.lang.String GEFEDITPARTTESTOBJECT_CLASSNAME
           
static java.lang.String GUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String GUITESTOBJECT_CLASSNAME
           
static java.lang.String INTERNALFRAMETESTOBJECT_CLASSNAME
           
static java.lang.String MESSAGEBOXTESTOBJECT_CLASSNAME
           
static java.lang.String PALETTEGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String PROCESSTESTOBJECT_CLASSNAME
           
static java.lang.String SCROLLSUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String SCROLLTESTOBJECT_CLASSNAME
           
static java.lang.String SELECTGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String SHELLTESTOBJECT_CLASSNAME
           
static java.lang.String STATELESSGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String SUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String TABITEMTESTOBJECT_CLASSNAME
           
static java.lang.String TESTOBJECT_CLASSNAME
           
static java.lang.String TEXTGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String TEXTGUITESTOBJECT_CLASSNAME
           
static java.lang.String TEXTSCROLLTESTOBJECT_CLASSNAME
           
static java.lang.String TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String TOGGLEGUITESTOBJECT_CLASSNAME
           
static java.lang.String TOGGLETESTOBJECT_CLASSNAME
           
static java.lang.String TOPLEVELSUBITEMTESTOBJECT_CLASSNAME
           
static java.lang.String TOPLEVELTESTOBJECT_CLASSNAME
           
static java.lang.String TRACKBARTESTOBJECT_CLASSNAME
           
protected  java.awt.Rectangle vomClippedRectangle
           
 
Fields inherited from class com.rational.test.ft.sys.RegisteredObject
theTestObject
 
Fields inherited from interface com.rational.test.ft.domain.IDataDriven
INCLUDE_ALL, INCLUDE_JUSTOBJECT, INCLUDE_SIBLINGS
 
Constructor Summary
ProxyTestObject(java.lang.Object theObjectInTheSUT)
          Sets the object as a member variable for the proxy.
 
Method Summary
protected  void addDataDrivableCommands(ProxyTestObject proxy, java.util.Vector commands, int includeChildren)
           
abstract  void addRecognitionProperty(java.lang.String property, java.lang.Object value, int weight)
          Defines an additional recognition property that this proxy can use.
 boolean baseClassMatch(java.lang.String baseClassName)
           
 boolean canTakeVP()
           
 boolean equals(java.lang.Object obj)
          Overrides the object-level equals with an equality against the true test objects.
 ProxyTestObject[] findChildrenWithProperties(com.rational.test.ft.object.manager.FindPropertySet fps, boolean mappableOnly)
          Finds all candidates that match given search criteria starting at this ProxyTestObject.
 java.lang.Object findChildrenWithPropertiesAndInvoke(com.rational.test.ft.object.manager.FindPropertySet fps, java.lang.String methodName, java.lang.String methodSignature, java.lang.Object[] args, boolean mappableOnly, boolean invokeOnProxy)
          Finds a candidate that matches given search criteria starting at this ProxyTestObject.
 IChannel getChannel()
          Returns a channel for the object.
abstract  ProxyTestObject[] getChildren()
          Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object.
 ProxyTestObject[] getChildren(com.rational.test.ft.sys.ContextObject contextProxy)
          Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object based on the context which was set by the argument proxy test object
 com.rational.test.ft.sys.MethodSpecification getDataDrivableCommand()
          This method must be implemented by any proxy that wishes to support data driving.
 com.rational.test.ft.sys.MethodSpecification[] getDataDrivableCommands(int includeChildren)
          Walks the proxy parent-child hierarchy and returns a command for each control that is data drivable.
abstract  java.lang.String getDescriptiveName()
          Returns a name that can be used to describe the associated UI object in a script.
 java.lang.Object getField(java.lang.String fieldName)
          Gets a field from the underlying object represented by the ProxyTestObject.
 java.lang.String[] getIgnorableProperties()
           
abstract  java.lang.Object getIndexer(java.lang.String name, java.lang.Object[] indexes)
          Returns the value of a TestObject's indexer at the given index.
abstract  com.rational.test.ft.value.IndexerInfo[] getIndexers()
          Returns information about the TestObject's indexers, if applicable.
abstract  ProxyTestObject[] getMappableChildren()
          Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object.
 ProxyTestObject[] getMappableChildren(com.rational.test.ft.sys.ContextObject contextProxy)
          Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object.
abstract  ProxyTestObject getMappableParent()
          Returns a proxy object for the mappable parent of this object; returns null if this object has no mappable parent.
 ProxyTestObject getMappableParent(com.rational.test.ft.sys.ContextObject contextProxy)
          Returns a proxy object for the mappable parent of this object; returns null if this object has no mappable parent.
abstract  com.rational.test.ft.value.MethodInfo[] getMethods()
          Returns an array containing method signatures for all methodsaccessiblee against the associated test object.
abstract  com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
          Returns a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates.
abstract  java.util.Hashtable getNonValueProperties()
          Returns the properties that are not supported because the value is a reference to another object.
 java.lang.String getObjectClassName()
          Returns the class name of the associated object.
 java.lang.String getObjectCustomClassName()
          Returns the custom class name of the associated object.
abstract  ProxyTestObject[] getOwnedObjects()
          Returns an array of proxies for the objects owned by this object.
 ProxyTestObject[] getOwnedObjects(java.lang.String domain)
          Returns an array of proxies for the objects owned by this object.
abstract  ProxyTestObject getOwner()
          Returns a proxy object for the owner of this object; returns null if this object has no owner.
abstract  ProxyTestObject getParent()
          Returns a proxy object for the parent of this object; returns null if this object has no parent.
 ProxyTestObject getParent(com.rational.test.ft.sys.ContextObject contextProxy)
          Returns a proxy object for the parent of this object; returns null if this object has no parent.
abstract  java.util.Hashtable getProperties()
          Returns a complete set of properties for the associated test object.
abstract  java.lang.Object getProperty(java.lang.String propertyName)
          Gets the value for a specific property defined in getProperties() or getRecognitionProperties().
 ProxyTestObject getProxy()
          Exports access to the proxy for the object being evaluated.
abstract  java.util.Hashtable getRecognitionProperties()
          Returns an enumeration of properties used to identify the associated test object.
abstract  int getRecognitionPropertyWeight(java.lang.String propertyName)
          Returns an indication of how useful this property is for recognition.
 java.lang.String getRole()
          Returns a brief type name that describes the role this object plays in the UI.
 com.rational.test.ft.sys.MethodSpecification getScriptCommandAnchor()
          This method returns the method specification for a script commands anchor attribute.
 com.rational.test.ft.script.ScriptCommandFlags getScriptCommandFlags()
          This method returns an active state value that reflects the state of the test object at the time of the call.
abstract  java.util.Hashtable getStandardProperties()
          Returns a complete set of consistent properties for the associated test object.
 com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
          Constructs the specified verification data object.
abstract  java.util.Hashtable getTestDataTypes()
          Returns a hashtable of data type descriptions of the verification point data available with the associated object.
abstract  TestDomainImplementation getTestDomain()
          Returns the TestDomain that this proxy object is associated with.
abstract  java.lang.String getTestObjectClassName()
          Returns a valid class name specification.
abstract  ProxyTestObject getTopMappableParent()
          Returns a proxy object for the top mappable parent of this object; returns a pointer to itself if this object has no mappable parent.
abstract  ProxyTestObject getTopParent()
          Returns a proxy object for the top parent of this object; returns a pointer to itself if this object has no parent.
abstract  java.lang.String getUniqueId()
          Returns a string for the associated object.
protected  ProxyTestObject getVisualClippableParent()
          Return the clippable parent for the control
 java.awt.Rectangle getVisualClippedRectangle()
          The optimized way to obtain the ClippedRectangle.
 ProxyTestObject[] getVisualMappableChildren()
          Returns the visual mappable Children for the given ProxyTestObject
 ProxyTestObject getVisualTopParent()
          Return the top mappable parent that is sensible for the Visual Object Maps In case of HTML document is top visual parent In case of PDF, page is the top visual parent
 java.lang.Object getVOMSpecificProperty(java.lang.String propertyName)
          Return VOM Specific internal Property if set by the proxies to uniquely identify its top level window
abstract  boolean hasAddedRecognitionProperties()
          Returns true if recognition properties have been added to this proxy from an external source through addRecognitionProperty().
 boolean hasSpecialFrameState()
           
 boolean isClassIndexConsidered()
          To include or ignore classindex property while scoring the underlying object represented by the ProxyTestObject.
 boolean isSameObject(java.lang.Object obj)
          Returns true if the supplied test object represents the same underlying object.
 boolean isValidObject()
          Returns true if the underlying object is still valid.
 void ping()
          Validates the existence of the object reference.
abstract  void processMouseEvent(IMouseActionInfo action)
          Updates the supplied action with an appropriate MethodSpecification to play back the action.
abstract  void setIndexer(java.lang.String name, java.lang.Object[] indexes, java.lang.Object val)
          Sets the value of a TestObject's indexer.
abstract  void setProperty(java.lang.String propertyName, java.lang.Object value)
          Sets the value for a specific property defined in getProperties() or getRecognitionProperties().
abstract  boolean shouldBeMapped()
          Determines whether the object is interesting from a persistent testability sense and should therefore be added to the object map.
 boolean suppressKeyAction()
          Flags the recorder to ignore key events relative to this top-level proxy.
 com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType, com.rational.test.ft.vp.ITestData testData)
          Updates the supplied test data object and returns it.
 
Methods inherited from class com.rational.test.ft.sys.RegisteredObject
addProxyReference, dereference, getObject, getRegisteredId, getTransactionId, isReferenced, isReleaseRequired, register, registerTransiently, release, toString, unregister
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected static final com.rational.test.ft.util.FtDebug debug

BROWSERTESTOBJECT_CLASSNAME

public static final java.lang.String BROWSERTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

BROWSERTABTESTOBJECT_CLASSNAME

public static final java.lang.String BROWSERTABTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

DOCUMENTTESTOBJECT_CLASSNAME

public static final java.lang.String DOCUMENTTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

DOMAINTESTOBJECT_CLASSNAME

public static final java.lang.String DOMAINTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

FILEDIALOGTESTOBJECT_CLASSNAME

public static final java.lang.String FILEDIALOGTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

FRAMETESTOBJECT_CLASSNAME

public static final java.lang.String FRAMETESTOBJECT_CLASSNAME
See Also:
Constant Field Values

GUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String GUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

GUITESTOBJECT_CLASSNAME

public static final java.lang.String GUITESTOBJECT_CLASSNAME
See Also:
Constant Field Values

INTERNALFRAMETESTOBJECT_CLASSNAME

public static final java.lang.String INTERNALFRAMETESTOBJECT_CLASSNAME
See Also:
Constant Field Values

PROCESSTESTOBJECT_CLASSNAME

public static final java.lang.String PROCESSTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SCROLLTESTOBJECT_CLASSNAME

public static final java.lang.String SCROLLTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SCROLLSUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String SCROLLSUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

STATELESSGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String STATELESSGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String SUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TESTOBJECT_CLASSNAME

public static final java.lang.String TESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TEXTGUITESTOBJECT_CLASSNAME

public static final java.lang.String TEXTGUITESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TEXTGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String TEXTGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TEXTSCROLLTESTOBJECT_CLASSNAME

public static final java.lang.String TEXTSCROLLTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SELECTGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String SELECTGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TOGGLEGUITESTOBJECT_CLASSNAME

public static final java.lang.String TOGGLEGUITESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TOGGLETESTOBJECT_CLASSNAME

public static final java.lang.String TOGGLETESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TOPLEVELTESTOBJECT_CLASSNAME

public static final java.lang.String TOPLEVELTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TOPLEVELSUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String TOPLEVELSUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TRACKBARTESTOBJECT_CLASSNAME

public static final java.lang.String TRACKBARTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

CROSSDOMAINCONTAINER_CLASSNAME

public static final java.lang.String CROSSDOMAINCONTAINER_CLASSNAME
See Also:
Constant Field Values

EMBEDDEDBROWSERTESTOBJECT_CLASSNAME

public static final java.lang.String EMBEDDEDBROWSERTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

FRAMESUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String FRAMESUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

ECLIPSETOPLEVELTESTOBJECT_CLASSNAME

public static final java.lang.String ECLIPSETOPLEVELTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

SHELLTESTOBJECT_CLASSNAME

public static final java.lang.String SHELLTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

PALETTEGUISUBITEMTESTOBJECT_CLASSNAME

public static final java.lang.String PALETTEGUISUBITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

GEFEDITPARTTESTOBJECT_CLASSNAME

public static final java.lang.String GEFEDITPARTTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

TABITEMTESTOBJECT_CLASSNAME

public static final java.lang.String TABITEMTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

MESSAGEBOXTESTOBJECT_CLASSNAME

public static final java.lang.String MESSAGEBOXTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

COLORDIALOGTESTOBJECT_CLASSNAME

public static final java.lang.String COLORDIALOGTESTOBJECT_CLASSNAME
See Also:
Constant Field Values

vomClippedRectangle

protected java.awt.Rectangle vomClippedRectangle
Constructor Detail

ProxyTestObject

public ProxyTestObject(java.lang.Object theObjectInTheSUT)
Sets the object as a member variable for the proxy. All interactions with the supplied object are performed through this class. If theObjectInTheSUT is not null, it should support java.lang.Object.equals() and java.lang.Object.hashCode so that the test domain can find the proxy for the object based on theObjectInTheSUT.

Any proxy that is registered with this system has its release() method invoked before it is finalized. A proxy that is returned to a test script is automatically registered, and this delays its release. Such a proxy is not released until the test script calls one of the TestObject.unregister methods. The proxy can depend on the call to release() and can override this to free any non-Java resources that the proxy may be using.

Since:
RFT1.0
Method Detail

getProxy

public ProxyTestObject getProxy()
Exports access to the proxy for the object being evaluated. This method is used in find.

Returns:
The proxy for the object being evaluated.
Since:
RFT1.0

equals

public boolean equals(java.lang.Object obj)
Overrides the object-level equals with an equality against the true test objects.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare against. If obj is a ProxyTestObject, the comparison is made with the underlying object.
Returns:
true if the underlying test objects are equal.
Since:
RFT1.0

isSameObject

public boolean isSameObject(java.lang.Object obj)
Returns true if the supplied test object represents the same underlying object. This method is different from equals in that it represents an "==" of the object in the AUT rather than an "equals" of these objects.

Parameters:
obj - The object to compare against. If obj is a ProxyTestObject, the comparison is made with the underlying object.
Returns:
true if the underlying test objects are ==.
Since:
RFT1.0

isValidObject

public boolean isValidObject()
Returns true if the underlying object is still valid. This method is called by the framework when the proxy is being invoked through reflection. In some domains, the proxies access to the underlying object may not be guaranteed, but there may be some checks that could be used to safeguard the proxy. For example, in Microsoft Windows, a proxy that wrapped an HWND-based object might want to validate that the HWND was still correct. It might do this by checking the window classname, the thread to which the window belongs, and the validity of the window handle itself. The default implementation just returns true. If this returns false, subsequent calls to the object may be blocked.

Specified by:
isValidObject in interface IProxyBase
Returns:
true if the underlying object is valid.
Since:
RFT1.1

baseClassMatch

public boolean baseClassMatch(java.lang.String baseClassName)

getTestObjectClassName

public abstract java.lang.String getTestObjectClassName()
Returns a valid class name specification. The test script (which runs in a separate process) interacts with a class that supports a shared interface with a specific proxy. This class is called a TestObject class. The testObject performs a cross-process (and cross-JVM) call to the same method against an associated proxy, which is this proxy.

This method should never return null, even if shouldBeMapped() returns false. User may still access objects such as this through scripting method calls and can return references to them. If a null were returned, the marshalling code would be confused and would not be able to construct a test object.

This method may be called from any thread.

Specified by:
getTestObjectClassName in interface IProxyBase
Returns:
The associated testObject class full name.
Since:
RFT1.0

getTestDomain

public abstract TestDomainImplementation getTestDomain()
Returns the TestDomain that this proxy object is associated with.

Specified by:
getTestDomain in interface IProxyBase
Returns:
The associated TestDomain class full name.
Since:
RFT1.0

getDescriptiveName

public abstract java.lang.String getDescriptiveName()
Returns a name that can be used to describe the associated UI object in a script. This name can be further adjusted to be unique to the script. Only characters used in Java identifiers are returned (alphabetic, numeric, or underscore characters). Other kinds of characters cause script compilation failures. An example of what to return is "OKButton" for a java.awt.Button with the associated text "OK".

Returns:
A descriptive object name.
Since:
RFT1.0

getRole

public java.lang.String getRole()
Returns a brief type name that describes the role this object plays in the UI. For instance a java.awt.Button might return button. There are suggested role constants in the TestObjectRole class. However, proxies are not limited to these constants.

The role is used for several purposes by the test infrastructure. First, the role can be used in the construction of object names in scripts, augmenting the name returned by getDescriptiveName(). The role is also used in the UI to decorate nodes in the map with icons that help users quickly associate the nodes with the roles they play in the system under test.

Returns:
A brief type name that describes the role this object plays in the UI.
Since:
RFT1.0

getObjectClassName

public java.lang.String getObjectClassName()
Returns the class name of the associated object. The default implementation returns the java class name of the associated object.

Returns:
Class name.
Since:
RFT1.0

getObjectCustomClassName

public java.lang.String getObjectCustomClassName()
Returns the custom class name of the associated object. The default implementation returns the java class name of the associated object.

Returns:
CustomClass name.
Since:
RFT8.1

getUniqueId

public abstract java.lang.String getUniqueId()
Returns a string for the associated object. This string must be unique and must be identical for each call to this method for the same instance of the UI object.

Returns:
A unique and repeatable identifier for the object being evaluated.

shouldBeMapped

public abstract boolean shouldBeMapped()
Determines whether the object is interesting from a persistent testability sense and should therefore be added to the object map. An object is considered interesting under one or more of the following conditions:

Examples of objects that are not interesting include:

Note that if the object is a container, the children are examined even if this method returns false.

Returns:
true if the represented control is interesting other than for nested objects.
Since:
RFT1.0

getParent

public abstract ProxyTestObject getParent()
Returns a proxy object for the parent of this object; returns null if this object has no parent.

Returns:
The proxy for the parent test object or null for a top-level object.
Since:
RFT1.0

getParent

public ProxyTestObject getParent(com.rational.test.ft.sys.ContextObject contextProxy)
Returns a proxy object for the parent of this object; returns null if this object has no parent.

Parameters:
contextProxy - The contextProxy Test object is to set the context while finding the children
Returns:
The proxy for the parent test object or null for a top-level object.
Since:
RFT8.1

getMappableParent

public abstract ProxyTestObject getMappableParent()
Returns a proxy object for the mappable parent of this object; returns null if this object has no mappable parent. Note that only a proxy that shouldBeMapped should be returned from this method.

Returns:
The proxy for the first mappable parent test object or null for a top-level mapped object.
Since:
RFT1.0

getMappableParent

public ProxyTestObject getMappableParent(com.rational.test.ft.sys.ContextObject contextProxy)
Returns a proxy object for the mappable parent of this object; returns null if this object has no mappable parent. Note that only a proxy that shouldBeMapped should be returned from this method.

Parameters:
contextProxy - The contextProxy Test object is to set the context while finding the children
Returns:
The proxy for the first mappable parent test object or null for a top-level mapped object.
Since:
RFT8.1

getTopParent

public abstract ProxyTestObject getTopParent()
Returns a proxy object for the top parent of this object; returns a pointer to itself if this object has no parent.

Returns:
The proxy for the top parent test object or itself for a top-level object.
Since:
RFT1.0

getTopMappableParent

public abstract ProxyTestObject getTopMappableParent()
Returns a proxy object for the top mappable parent of this object; returns a pointer to itself if this object has no mappable parent.

Returns:
The proxy for the top parent test object or itself for a test object with no mappable parent.
Since:
RFT1.0

getChildren

public ProxyTestObject[] getChildren(com.rational.test.ft.sys.ContextObject contextProxy)
Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object based on the context which was set by the argument proxy test object

Parameters:
contextProxy - The contextProxy Test object is to set the context while finding the children
Returns:
An array of child proxies of this proxy.
Since:
RFT8.1

getChildren

public abstract ProxyTestObject[] getChildren()
Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object.

Returns:
An array of child proxies of this proxy.
Since:
RFT1.0

getMappableChildren

public abstract ProxyTestObject[] getMappableChildren()
Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object. This method is always used when building up the test objects to be added to a map, because a side additional recognition properties may be added to the child objects.

Returns:
An array of child proxies of this proxy.
Since:
RFT1.0

getMappableChildren

public ProxyTestObject[] getMappableChildren(com.rational.test.ft.sys.ContextObject contextProxy)
Returns an array of proxies, visible by using the TestObject interface from a script, for the children of this object. This method is always used when building up the test objects to be added to a map, because a side additional recognition properties may be added to the child objects.

Returns:
An array of child proxies of this proxy.
Since:
RFT8.1

getOwner

public abstract ProxyTestObject getOwner()
Returns a proxy object for the owner of this object; returns null if this object has no owner.

Returns:
The proxy for the owning object, or null for a top object without an owner.
Since:
RFT1.0

getOwnedObjects

public abstract ProxyTestObject[] getOwnedObjects()
Returns an array of proxies for the objects owned by this object.

Returns:
An array of proxies of objects owned by this proxy.
Since:
RFT1.0

getOwnedObjects

public ProxyTestObject[] getOwnedObjects(java.lang.String domain)
Returns an array of proxies for the objects owned by this object. The domainName argument that it takes is used by hint. This function could still return the owned objects that don't belong to this domain.

Returns:
An array of proxies of objects owned by this proxy.
Since:
RFT1.0

suppressKeyAction

public boolean suppressKeyAction()
Flags the recorder to ignore key events relative to this top-level proxy. This method is used to suppress the recording of key events against top-level proxy objects that capture key text in other fashions.

Returns:
true for a top-level proxy that wants to suppress the generation of inputKeys method calls.
Since:
RFT1.0

getScriptCommandAnchor

public com.rational.test.ft.sys.MethodSpecification getScriptCommandAnchor()
This method returns the method specification for a script commands anchor attribute. If not specified explicitly in a script command method specification this method is used to implicitly define the script commands anchor attribute.

Returns:
The anchor attribute for a script command relative to the specific proxy.
Since:
RFT1.0

getScriptCommandFlags

public com.rational.test.ft.script.ScriptCommandFlags getScriptCommandFlags()
This method returns an active state value that reflects the state of the test object at the time of the call. The state includes values such as enabled and showing< and allows the find algorithm to wait until a required state has been achieved.

Returns:
An object that reflects the active state of the represented test object.

processMouseEvent

public abstract void processMouseEvent(IMouseActionInfo action)
Updates the supplied action with an appropriate MethodSpecification to play back the action. This method is the primary record interface for mouse events against a particular control. Only one MethodSpecification is maintained in the action state. If the active specification is valid, it is not updated.

Parameters:
action - The event cache and other mouse state information for this mouse action.
Since:
RFT1.0
See Also:
IMouseActionInfo, MethodSpecification

getMethodSpecForPoint

public abstract com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
Returns a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates. By default, a method specification for IGraphical.getScreenPoint is returned.

Parameters:
action - The event cache and other mouse state information for this mouse action.
Since:
RFT1.0
See Also:
MethodSpecification

getRecognitionProperties

public abstract java.util.Hashtable getRecognitionProperties()
Returns an enumeration of properties used to identify the associated test object. Useful recognition properties are properties such as the programmatic name or a persistent description. Less interesting are the visible text on a button or label, or the tooltip text, or the foreground color. Uninteresting properties are the transient properties such as hasFocus or isShowing.

Returns:
An enumeration of recognition properties. The returned objects are of class TestObjectProperty.
Since:
RFT1.0
See Also:
getRecognitionPropertyWeight(String), getProperty(String), addRecognitionProperty(String,Object,int)

getRecognitionPropertyWeight

public abstract int getRecognitionPropertyWeight(java.lang.String propertyName)
Returns an indication of how useful this property is for recognition. A value of 0 indicates not useful at all, and a value of 100 indicates that the property is extremely useful for recognition. This method must return a value greater than or equal to zero and less than or equal to 100.

Parameters:
propertyName - The name of the recognition property to return a weight value for.
Since:
RFT1.0
See Also:
getRecognitionProperties()

addRecognitionProperty

public abstract void addRecognitionProperty(java.lang.String property,                                             java.lang.Object value,                                             int weight)
Defines an additional recognition property that this proxy can use. Properties defined outside a proxy have the side effect that they must always be attached to the proxy when created. This can be problematic in some domains. These properties must be ignored if appropriate proxy caching is not being performed. Properties added to a proxy are returned through getRecognitionProperties().

Parameters:
property - The recognition property name. Care should be taken to avoid conflicts with existing property names.
value - The value of the added recognition property.
weight - The weight associated with this recognition property. This value is returned when getRecognitionPropertyWeight() is called.
Since:
RFT1.0
See Also:
getRecognitionProperties(), getRecognitionPropertyWeight(String), getProperty(String)

hasAddedRecognitionProperties

public abstract boolean hasAddedRecognitionProperties()
Returns true if recognition properties have been added to this proxy from an external source through addRecognitionProperty().

Returns:
true if recognition properties have been added to this proxy from an external source through addRecognitionProperty(String,Object,int).
Since:
RFT1.0
See Also:
addRecognitionProperty(String,Object,int)

getProperties

public abstract java.util.Hashtable getProperties()
Returns a complete set of properties for the associated test object. The meaning of a property is specific to the test domain and the test object. Typically, this is a set of name/value pairs that describe the test object and its active state. Properties such as font, colors, and coordinate information are typically associated with a GUI test object. Associated data and state information can also be returned, depending on the test object.

This method does not return properties whose values are references to objects. The method getNonValueProperties() returns information about such properties.

Returns:
The set of known properties associated with a test object.
Since:
RFT1.0
See Also:
getProperty(String), setProperty(String,Object), getStandardProperties(), getNonValueProperties()

getIgnorableProperties

public java.lang.String[] getIgnorableProperties()

getStandardProperties

public abstract java.util.Hashtable getStandardProperties()
Returns a complete set of consistent properties for the associated test object. Consistent properties are those properties that exist regardless of the platform the test object is running on. Domains that do not support the notion of standard properties should implement this method identically to getProperties(). The HTML domain supports standard properties and returns properties that are consistent across browser versions. The Java domain does not support this notion of standard properties. In this domain, getStandardProperties, and getProperties do the same thing. For HTML, standard properties are a subset of the properties returned by getProperties(). The meaning of a property is specific to the test domain and the test object. Typically, this is a set of name/value pairs that describe the test object and its active state. Properties such as font, colors, and coordinate information are typically associated with a GUI test object. Associated data and state information can also be returned, depending on the test object.

Returns:
The set of standard properties associated with a test object.
Since:
RFT1.0
See Also:
getProperty(String), setProperty(String,Object), getProperties(), getNonValueProperties()

getProperty

public abstract java.lang.Object getProperty(java.lang.String propertyName)
Gets the value for a specific property defined in getProperties() or getRecognitionProperties(). If the property is not defined by either of these methods, this method throws PropertyNotFoundException.

Parameters:
propertyName - The name of the property to fetch.
Returns:
The active value of the specified property for the associated test object.
Since:
RFT1.0
See Also:
getProperties(), setProperty(String,Object), getRecognitionProperties(), addRecognitionProperty(String,Object,int)

setProperty

public abstract void setProperty(java.lang.String propertyName,                                  java.lang.Object value)
Sets the value for a specific property defined in getProperties() or getRecognitionProperties(). Properties not defined by either of these methods, and properties whose values cannot be modified throw an appropriately populated PropertyNotFoundException.

Parameters:
propertyName - The name of the property to redefine. This name is the same as that returned by getProperties().
Since:
RFT1.0
See Also:
getProperties(), getProperty(String)

getNonValueProperties

public abstract java.util.Hashtable getNonValueProperties()
Returns the properties that are not supported because the value is a reference to another object. These properties can still be accessed using getProperty(). If such a property is returned to the test script, it is manifested as a TestObject containing a reference to the object in the SUT. The test script should call the TestObject method unregister() to release the object.

When an object is unregistered, the release() method that all ProxyTestObjects inherit from RegisteredObject is called.

Returns:
The set of properties that are not available.
Since:
RFT1.0
See Also:
getProperties(), getStandardProperties(), getProperty(String), setProperty(String,Object)

getIndexer

public abstract java.lang.Object getIndexer(java.lang.String name,                                             java.lang.Object[] indexes)
Returns the value of a TestObject's indexer at the given index. If the value has a value class then the value class is returned, otherwise a TestObject is registered and returned. Information about a TestObject's indexer properties can be obtained via getIndexers().

Parameters:
name - the name of the indexer
indexes - the indexes to get the value of
Since:
RFT2.0

getIndexers

public abstract com.rational.test.ft.value.IndexerInfo[] getIndexers()
Returns information about the TestObject's indexers, if applicable.

Since:
RFT2.0
See Also:
IndexerInfo

setIndexer

public abstract void setIndexer(java.lang.String name,                                 java.lang.Object[] indexes,                                 java.lang.Object val)
Sets the value of a TestObject's indexer.

Parameters:
name - the name of the indexer
indexes - the indexes to set the value of
value - the value to set the index to
Since:
RFT2.0

getMethods

public abstract com.rational.test.ft.value.MethodInfo[] getMethods()
Returns an array containing method signatures for all methodsaccessiblee against the associated test object. Methods that cannot be directly invoked are not returned. The set of accessible methods is domain and test-object specific.

Returns:
An array containing method signatures for all methods accessible against the associated test object.
See Also:
getProperties(), getStandardProperties(), getNonValueProperties()

getTestDataTypes

public abstract java.util.Hashtable getTestDataTypes()
Returns a hashtable of data type descriptions of the verification point data available with the associated object. The hashtable keys are String objects that are used as the VP type in the associated test data. The type is a simple value that is different from other type values associated with this object under test. The type keys map to a verbose description of the test data, reasonable for presentation to a user.

Returns:
An hashtable of type/description pairs used to describe the verification data available from this proxy.
Since:
RFT1.0
See Also:
getTestData(String), ITestData

getTestData

public com.rational.test.ft.vp.ITestData getTestData(java.lang.String testDataType)
Constructs the specified verification data object. The testDataType parameter is a hashtable key returned by getTestDataTypes().

Parameters:
testDataType - A test data type supplied by getTestDataTypes().
Returns:
The verification data for the supplied type.
Since:
RFT1.0
See Also:
getTestDataTypes(), ITestData

updateTestData

public com.rational.test.ft.vp.ITestData updateTestData(java.lang.String testDataType,                                                         com.rational.test.ft.vp.ITestData testData)
Updates the supplied test data object and returns it. The testDataType parameter is a hashtable key returned by getTestDataTypes(). The testData is a previously supplied ITestData object that needs to be updated to reflect the current state of the associated test object.

Parameters:
testDataType - A test data type supplied by getTestDataTypes().
testData - The test database object that requires updating.
Returns:
The testData passed in with appropriate updates.
Since:
RFT1.0
See Also:
getTestDataTypes(), ITestData

getDataDrivableCommands

public com.rational.test.ft.sys.MethodSpecification[] getDataDrivableCommands(int includeChildren)
Walks the proxy parent-child hierarchy and returns a command for each control that is data drivable. Controls that are not data drivable and do not have children that are data drivable should return null.

The reason that the proxies are left with doing the walk instead of it happening at a higher level is because they have a better understanding of the hierarchy they expose. Domains like HTML can take advantage of internal knowledge to allow them better control the traversal of interesting child proxies relative to data driving. By default this method will perform a standard traversal of the proxy hierarchy and does not need to be overridden unless necessary.

Specified by:
getDataDrivableCommands in interface IDataDriven
Parameters:
includeChildren - Flag to control which child objects are considered for data driving. Must be IDataDriven.INCLUDE_JUSTOBJECT, IDataDriven.INCLUDE_SIBLINGS or IDataDriven.INCLUDE_ALL.
Returns:
An array of commands that can be data driven.
Since:
RFT2.0
See Also:
getDataDrivableCommand()

addDataDrivableCommands

protected void addDataDrivableCommands(ProxyTestObject proxy,                                        java.util.Vector commands,                                        int includeChildren)

getDataDrivableCommand

public com.rational.test.ft.sys.MethodSpecification getDataDrivableCommand()
This method must be implemented by any proxy that wishes to support data driving. By default a null value is returned.

Specified by:
getDataDrivableCommand in interface IDataDriven
Since:
RFT2.0
See Also:
getDataDrivableCommands(int)

ping

public void ping()
Validates the existence of the object reference.

Since:
RFT1.0

getChannel

public IChannel getChannel()
Returns a channel for the object. The default proxy implementation associates an object with the TestContext's default base channel.

Specified by:
getChannel in interface IChannelObject
Specified by:
getChannel in class com.rational.test.ft.sys.RegisteredObject
Returns:
the channel used by this object.
Since:
RFT1.0

hasSpecialFrameState

public boolean hasSpecialFrameState()

findChildrenWithProperties

public ProxyTestObject[] findChildrenWithProperties(com.rational.test.ft.object.manager.FindPropertySet fps,                                                     boolean mappableOnly)
Finds all candidates that match given search criteria starting at this ProxyTestObject.

Parameters:
propSet - The property set to match against.
mappableOnly - Whether to search all children or just mappable children
Since:
RFT2.0
See Also:
TestObject.find(Subitem)

findChildrenWithPropertiesAndInvoke

public java.lang.Object findChildrenWithPropertiesAndInvoke(com.rational.test.ft.object.manager.FindPropertySet fps,                                                             java.lang.String methodName,                                                             java.lang.String methodSignature,                                                             java.lang.Object[] args,                                                             boolean mappableOnly,                                                             boolean invokeOnProxy)
Finds a candidate that matches given search criteria starting at this ProxyTestObject. The supplied method is then invoked on the found object, or its proxy.

Parameters:
propSet - The property set to match against.
methodName - The name of the method to invoke.
methodSignature - The JNI signature of the method to invoke.
args - The arguments to be provided to the invoked method.
mappableOnly - Whether to search all children or just mappable children
invokeOnProxy - Whether to invoke the method on the proxy or object in the SUT.
Since:
RFT2.0

getField

public java.lang.Object getField(java.lang.String fieldName)
Gets a field from the underlying object represented by the ProxyTestObject.

Parameters:
fieldName - The name of the field to retrieve.
Since:
RFT2.0

isClassIndexConsidered

public boolean isClassIndexConsidered()
To include or ignore classindex property while scoring the underlying object represented by the ProxyTestObject.

Since:
RFT2.0

getVisualTopParent

public ProxyTestObject getVisualTopParent()
Return the top mappable parent that is sensible for the Visual Object Maps In case of HTML document is top visual parent In case of PDF, page is the top visual parent

Returns:
The top mappable Visual Parent

canTakeVP

public boolean canTakeVP()

getVisualClippableParent

protected ProxyTestObject getVisualClippableParent()
Return the clippable parent for the control

Returns:
ProxyTestObject of the control

getVisualClippedRectangle

public java.awt.Rectangle getVisualClippedRectangle()
The optimized way to obtain the ClippedRectangle.

Returns:
The ClippedScreen Rectangle of the control

getVisualMappableChildren

public ProxyTestObject[] getVisualMappableChildren()
Returns the visual mappable Children for the given ProxyTestObject

Returns:
same as getMappableChildren

getVOMSpecificProperty

public java.lang.Object getVOMSpecificProperty(java.lang.String propertyName)
Return VOM Specific internal Property if set by the proxies to uniquely identify its top level window

Parameters:
propertyName - The VOM
Returns: