IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.object.interfaces
Class ScreenTestObject

java.lang.Object   extended by com.rational.test.ft.object.interfaces.TestObject
      extended by com.rational.test.ft.object.interfaces.ClientTestObject
          extended by com.rational.test.ft.object.interfaces.GuiTestObject
              extended by com.rational.test.ft.object.interfaces.ScreenTestObject
All Implemented Interfaces:
IGraphical

public class ScreenTestObject
extends GuiTestObject


Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ref
 
Constructor Summary
ScreenTestObject()
           
 
Method Summary
 boolean ensureObjectIsVisible()
          Ensures that the object is visible on the screen, provided that the object exists
 java.lang.String getObjectClassName()
          Returns the complete class name for the object in the software under test.
 java.util.Hashtable getProperties()
          Returns a Hashtable containing properties.
 java.util.Hashtable getRecognitionProperties()
          Returns the properties that are useful for recognition.
 java.awt.Rectangle getScreenRectangle()
          Returns the rectangle for this window relative to the top left corner of the screen.
 java.awt.Rectangle[] getScreenRectangleForText(java.lang.String input, java.awt.Rectangle rectangle)
          Returns an array of rectangles of the given text found in the given rectangle.
 ScriptCommandFlags getScriptCommandFlags()
          Returns an active state value that reflects the state of the TestObejct at the time of the call.
 java.util.Hashtable getTestDataTypes()
          Returns a Hashtable of data type descriptions of the verification point data available with the associated object in the software under test.
 java.awt.Rectangle getVisibleArea()
           
 int hashCode()
          Returns Using TestObject in hash functions is discouraged.
 boolean isMappedObject()
          Returns true if the object contains a mapped reference.
protected  boolean isScreenTestObject()
          Check to see if this TestObject is indeed the Screen.
 boolean performTest(IFtVerificationPoint baseline)
          Captures, compares and logs active data available relative to this object instance against the supplied baseline data.
 boolean performTest(IFtVerificationPoint baseline, boolean compareTrueEqualsPass)
          Captures, compares and logs active data available relative to this object instance against the supplied baseline data.
 boolean performTest(IFtVerificationPoint baseline, double delayBetweenRetries, double maximumTestTime)
          Captures, compares and logs active data available relative to this object instance against the supplied baseline data.
 boolean performTest(IFtVerificationPoint baseline, double delayBetweenRetries, double maximumTestTime, boolean compareTrueEqualsPass)
          Captures, compares and logs active data available relative to this object instance against the supplied baseline data.
 
Methods inherited from class com.rational.test.ft.object.interfaces.GuiTestObject
canTakeVP, click, click, click, click, clickRadio, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getChildAtPoint, getClippedScreenRectangle, getImage, getImage, getScreenPoint, getScreenPoint, getScreenSnapshot, hasFocus, hover, hover, hover, hover, invokeProxyWithGuiDelay, invokeProxyWithGuiDelay, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 
Methods inherited from class com.rational.test.ft.object.interfaces.ClientTestObject
exists, find, find, findAndInvoke, findAndInvokeProxy, invoke, invokeProxy, unregister, waitForExistence
 
Methods inherited from class com.rational.test.ft.object.interfaces.TestObject
compare, compare, compareAndLog, compareAndLog, equals, find, findAndInvoke, getActualData, getChildren, getDescribedObject, getDescribedObjects, getDescriptiveName, getDomain, getField, getIndexer, getIndexer, getIndexers, getMappableChildren, getMappableParent, getMapProperties, getMethods, getNameInScript, getNonValueProperties, getObjectCustomClassName, getObjectReference, getOwnedObjects, getOwner, getParent, getProcess, getProperty, getPropertyFromMap, getRecognitionPropertyWeight, getStandardProperties, getTestData, getTopMappableParent, getTopParent, invoke, invokeProxy, isSameObject, isTopLevelTestObject, setIndexer, setIndexer, setMapProperties, setProperty, toString, updateTestData, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScreenTestObject

public ScreenTestObject()
Method Detail

getScreenRectangle

public java.awt.Rectangle getScreenRectangle()
Returns the rectangle for this window relative to the top left corner of the screen. null is returned if the GUI object is not showing.

Specified by:
getScreenRectangle in interface IGraphical
Overrides:
getScreenRectangle in class GuiTestObject
Returns:
The adjusted rectangle surrounding window relative to the screen. null is returned if the window is not showing.
See Also:
GuiTestObject.isPointInObject(java.awt.Point)

ensureObjectIsVisible

public boolean ensureObjectIsVisible()
Description copied from class: GuiTestObject
Ensures that the object is visible on the screen, provided that the object exists

Overrides:
ensureObjectIsVisible in class GuiTestObject

getObjectClassName

public java.lang.String getObjectClassName()
Description copied from class: TestObject
Returns the complete class name for the object in the software under test.

Overrides:
getObjectClassName in class TestObject

getScriptCommandFlags

public ScriptCommandFlags getScriptCommandFlags()
Description copied from class: TestObject
Returns an active state value that reflects the state of the TestObejct 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 is achieved.

Overrides:
getScriptCommandFlags in class TestObject
Returns:
An object that reflects the active state of the represented TestObject

isMappedObject

public boolean isMappedObject()
Description copied from class: TestObject
Returns true if the object contains a mapped reference. Returns false for a TestObject that is returned by reference from the software under test.

Overrides:
isMappedObject in class TestObject

getTestDataTypes

public java.util.Hashtable getTestDataTypes()
Description copied from class: TestObject
Returns a Hashtable of data type descriptions of the verification point data available with the associated object in the software under test. The Hashtable keys are String objects that are used as the verification point 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. This is reasonable for presentation to a user.

Overrides:
getTestDataTypes in class TestObject
Returns:
A Hashtable of type/description pairs used to describe the verification data available from this proxy.
See Also:
TestObject.getTestData(String), ITestData

getProperties

public java.util.Hashtable getProperties()
Description copied from class: TestObject
Returns a Hashtable containing properties. Note that this is an extended Hashtable and can have null values. The keys are strings that represent property names; they are never null. This method does not return registered object references to objects in the software under test; it only returns properties that are value classes.

Overrides:
getProperties in class TestObject

getRecognitionProperties

public java.util.Hashtable getRecognitionProperties()
Description copied from class: TestObject
Returns the properties that are useful for recognition. Note that this is an extended Hashtable and has null values. The keys, which are strings that represent property names, are never null. This method does not return references to objects in the software under test; it only returns properties that are value classes.

Overrides:
getRecognitionProperties in class TestObject

getVisibleArea

public java.awt.Rectangle getVisibleArea()
Overrides:
getVisibleArea in class GuiTestObject

performTest

public boolean performTest(IFtVerificationPoint baseline)
Captures, compares and logs active data available relative to this object instance against the supplied baseline data.

Overrides:
performTest in class TestObject
Returns:
A true value is returned if the passing result is logged, otherwise false is returned.
Since:
RFT1.0
See Also:
performTest(IFtVerificationPoint,boolean), performTest(IFtVerificationPoint,double,double), performTest(IFtVerificationPoint,double,double,boolean)

performTest

public boolean performTest(IFtVerificationPoint baseline,                            boolean compareTrueEqualsPass)
Captures, compares and logs active data available relative to this object instance against the supplied baseline data. Allows failing verification points to return and log a passing result.

Overrides:
performTest in class TestObject
Parameters:
compareTrueEqualsPass - If true the expected and actual data must match to get a passing result. If false the expected and actual data must NOT match to get a passing result.
Returns:
A true value is returned if the passing result is logged, false is returned for a failing result.
Since:
RFT1.1
See Also:
performTest(IFtVerificationPoint), performTest(IFtVerificationPoint,double,double), performTest(IFtVerificationPoint,double,double,boolean)

performTest

public boolean performTest(IFtVerificationPoint baseline,                            double delayBetweenRetries,                            double maximumTestTime)
Captures, compares and logs active data available relative to this object instance against the supplied baseline data. Allows failing verification points to retry until a passing result can be returned or the retry timeout is reached.

Overrides:
performTest in class TestObject
Parameters:
delayBetweenRetries - the delay in seconds after a failed result is recaptured and retested.
maximumTestTime - the maximum time in seconds spent attempting to receive a passing result. Note that at least one attempt will be made to return a failed result, even if this value is a zero or negative value.
Returns:
A true value is returned if the passing result is logged, false is returned for a failing result.
Since:
RFT2.0
See Also:
performTest(IFtVerificationPoint), performTest(IFtVerificationPoint,boolean), performTest(IFtVerificationPoint,double,double,boolean)

performTest

public boolean performTest(IFtVerificationPoint baseline,                            double delayBetweenRetries,                            double maximumTestTime,                            boolean compareTrueEqualsPass)
Captures, compares and logs active data available relative to this object instance against the supplied baseline data. Allows failing verification points to retry until a passing result can be returned or the retry timeout is reached. Also allows failing verification points to return and log a passing result.

Overrides:
performTest in class TestObject
Parameters:
delayBetweenRetries - the delay in seconds after a failed result is recaptured and retested.
maximumTestTime - the maximum time in seconds spent attempting to receive a passing result. Note that at least one attempt will be made to return a failed result, even if this value is a zero or negative value.
compareTrueEqualsPass - If true the expected and actual data must match to get a passing result. If false the expected and actual data must NOT match to get a passing result.
Returns:
A true value is returned if the passing result is logged, false is returned for a failing result.
Since:
RFT2.0
See Also:
performTest(IFtVerificationPoint), performTest(IFtVerificationPoint,boolean), performTest(IFtVerificationPoint,double,double)

getScreenRectangleForText

public java.awt.Rectangle[] getScreenRectangleForText(java.lang.String input,                                                       java.awt.Rectangle rectangle)
Returns an array of rectangles of the given text found in the given rectangle. It expects VOP a separate component to be installed and available on the path.

Since:
RFT8.1

hashCode

public int hashCode()
Description copied from class: TestObject
Returns Using TestObject in hash functions is discouraged. It works but the performance could be bad. The equals method on the TestObject calls the remote process to find out if the objects are really equal. This function doesn't make a remote call but ensures the java rule which says hashCode should return the same value for those objects if equals return true. Performance of hash functions on this object will not be good if used

Overrides:
hashCode in class TestObject

isScreenTestObject

protected boolean isScreenTestObject()
Description copied from class: TestObject
Check to see if this TestObject is indeed the Screen. By default this returns false. This is here for compatibility. Please refer to ScreenTestObject for the actual implementation for a Screen Test Object.

Overrides:
isScreenTestObject in class TestObject
Returns:
See Also:
ScreenTestObject