|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester Proxy SDK Reference Project Version 2.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rational.test.ft.sys.RegisteredObject
com.rational.test.ft.domain.ProxyTestObject
com.rational.test.ft.domain.java.JavaProxy
com.rational.test.ft.domain.java.JavaGuiProxy
public abstract class JavaGuiProxy
This is the Java GUI object proxies base class. All Java GUI proxies must extend this class. The abstract ProxyTestObject base class defines the non-GUI object properties required to implement a proxy object. This abstract class extends that definition with the additional properties needed for a GUI object.
This class further contains the default implementation of various base class methods that proxy implementations may need to extend or override.
GuiTestObject
| Property | Usage |
|---|---|
| .class | The Java full class name of the test object. |
| .classIndex | The zero-based index of the class relative to the immediate parent in the object map. |
| Field Summary | |
|---|---|
protected static com.rational.test.ft.script.MouseModifiers |
LEFT
|
protected com.rational.test.ft.script.ScriptCommandFlags |
preDownState
|
protected JavaGuiProxy |
processMouseEventHandler
|
protected static java.lang.String |
ROLEINDEX
|
protected static int |
ROLEINDEXWEIGHT
|
protected static java.lang.String |
TESTDATA_SPECIALFRAMESTATE
|
protected static java.lang.String |
TESTDATA_SPECIALFRAMESTATE_DESCRIPTION
|
protected com.rational.test.ft.sys.graphical.TopLevelWindow |
topLevelWindow
|
| Fields inherited from class com.rational.test.ft.domain.java.JavaProxy |
|---|
debug, uniqueId |
| 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 | |
|---|---|
JavaGuiProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects sets the SUT object as a member variable for the proxy. |
|
| Method Summary | |
|---|---|
protected void |
activateTopWindow()
|
void |
click()
Left mouse click on the center point of the associated TestObject; is a simple shortcut to the click method with a modifier parameter (modifier set to MOUSE_LEFT). |
void |
click(com.rational.test.ft.script.MouseModifiers modifiers)
Perform a mouse click action with the specified modifiers at the center of the associated TestObject. |
void |
click(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
Perform a mouse click action on the specified coordinates relative to the associated TestObject. |
void |
click(java.awt.Point pt)
Left mouse click the specified coordinates relative to the associated TestObject. |
void |
doubleClick()
Left mouse dbl-click on the center point of the associated TestObject. |
void |
doubleClick(com.rational.test.ft.script.MouseModifiers modifiers)
Perform a mouse dbl-click action with the specified modifiers in the center of the associated TestObject. |
void |
doubleClick(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
Perform a mouse dbl-click action on the specified coordinates relative to the associated TestObject. |
void |
doubleClick(java.awt.Point pt)
Left mouse dbl-click on the specified coordinates relative to the associated TestObject. |
void |
drag()
Perform a MOUSE_LEFT drag action against the associated TestObject. |
void |
drag(com.rational.test.ft.script.MouseModifiers modifiers)
Perform a drag action against the associated TestObject with the supplied set of mouse modifiers. |
void |
drag(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
Perform a drag action against the associated TestObject. |
void |
drag(java.awt.Point pt1, java.awt.Point pt2)
Perform a MOUSE_LEFT drag action against the associated TestObject. |
void |
dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
Perform a drag action against the associated TestObject. |
void |
dragToScreenPoint(java.awt.Point screenPt)
Performs a MOUSE_LEFT drag action against the associated TestObject. |
void |
dragToScreenPoint(java.awt.Point objectPt, java.awt.Point screenPt)
Perform a MOUSE_LEFT drag action against the associated TestObject. |
protected void |
dumpAction(java.lang.String header, IMouseActionInfo action)
|
boolean |
ensureObjectIsVisible()
|
protected java.awt.Rectangle |
getActionRect()
Gets the screen relative rectangle and throws an invalid action exception if the rectangle is not valid. |
int |
getCachedRectX(IMouseActionInfo action)
|
int |
getCachedRectY(IMouseActionInfo action)
|
java.lang.Object |
getChildAtPoint(java.awt.Point pt)
Finds the child object that is at the specified point. |
abstract java.util.Enumeration |
getChildrenEnumeration()
Return an enumeration of mappable proxies for the children of this object. |
java.awt.Rectangle |
getClippedRect(java.awt.Rectangle childRect)
|
java.awt.Rectangle |
getClippedScreenRectangle()
Returns the clipped-screen rectangle for the associated TestObject |
abstract java.lang.String |
getDescriptiveName()
Returns a name that can be used to describe the associated UI object in a script. |
abstract java.util.Enumeration |
getImmediateChildren()
Return an enumeration of proxies for the immediate children of this object. |
abstract ProxyTestObject |
getMappableParent()
Returns a proxy object for the mappable parent of this object. |
com.rational.test.ft.sys.MethodSpecification |
getMethodSpecForPoint(java.awt.Point pt)
Return a MethodSpecification for a method that returns a java.awt.Point for the specified coordinates. |
abstract ProxyTestObject |
getParent()
Returns a proxy object for the parent of this object. |
abstract java.lang.Object |
getParentObject()
Returns an object for the parent of this object. |
JavaGuiProxy |
getProcessMouseEventHandler()
|
com.rational.test.ft.sys.graphical.TopLevelWindow |
getRegisteredTopLevelWindow()
Get the topLevelWindow for this proxy. |
java.awt.Point |
getScreenPoint()
Returns the screen relative point to a valid point within the object. |
java.awt.Point |
getScreenPoint(java.awt.Point pt)
Returns the screen relative point given an object relative point. |
abstract java.awt.Rectangle |
getScreenRectangle()
Returns the rectangle that contains the component being evaluated relative to the top left corner of the screen. |
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. |
java.lang.String |
getTestObjectClassName()
The default GUI test object classname is returned. |
com.rational.test.ft.object.interfaces.ITopWindow |
getTopMappableWindow()
All Gui Components must be inside a top-level object. |
com.rational.test.ft.object.interfaces.ITopWindow |
getTopWindow()
All Gui Components must be inside a top-level object. |
abstract boolean |
hasFocus()
Check the component under evaluation to determine if it has keyboard focus. |
void |
hover()
Hover the mouse over the center of the associated TestObject. |
void |
hover(double secondDelay)
Hover the mouse over the center of the associated TestObject. |
void |
hover(double secondDelay, java.awt.Point pt)
Hover the mouse over the specified coordinates of the associated TestObject. |
void |
hover(java.awt.Point pt)
Hover the mouse over the specified coordinates of the associated TestObject. |
protected boolean |
isDrag(IMouseActionInfo action)
Java-specific test to determine if the action is a drag action. |
abstract boolean |
isEnabled()
Check the component under evaluation to determine if it is enabled or disabled. |
boolean |
isOpaque()
Check the component under evaluation to determine if it is opaque or transparent. |
boolean |
isPointInObject(java.awt.Point pt)
Determines if the specified screen relative point is contained in the component under evaluation. |
protected boolean |
isPointInObject(java.awt.Point pt, java.awt.Rectangle screenRect)
|
abstract boolean |
isShowing()
Check the component under evaluation to determine if it is showing (as opposed to hidden). |
protected boolean |
modifiersChanged(IMouseActionInfo action)
|
void |
mouseMove(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
Perform a move action against the associated TestObject. |
void |
mouseMove(java.awt.Point pt)
Perform a mouse move action. |
void |
nClick(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
Perform a mouse n-click action on the specified coordinates relative to the associated TestObject. |
void |
nClickDrag(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject. |
void |
nClickDragToScreenPoint(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
Perform a mouse n-click drag action on the specified coordinates relative to the associated TestObject. |
protected void |
processHoverMouseEvent(IMouseActionInfo action)
|
void |
processMouseEvent(IMouseActionInfo action)
Return a MethodSpecification for the specified mouse event. |
void |
processSingleMouseEvent(IMouseActionInfo action)
|
void |
scrollRectToVisible(java.awt.Rectangle rect)
Scrolls the viewport(if it exists) so that the rectangle within the viewport becomes visible. |
void |
setProcessMouseEventHandler(JavaGuiProxy proxy)
|
void |
setTopLevelWindow(com.rational.test.ft.sys.graphical.TopLevelWindow tlw)
Set the topLevelWindow for this proxy. |
boolean |
shouldBeMapped()
Returns true; by default all test objects are mapped. |
| 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 |
|---|
protected static final com.rational.test.ft.script.MouseModifiers LEFT
protected com.rational.test.ft.script.ScriptCommandFlags preDownState
protected com.rational.test.ft.sys.graphical.TopLevelWindow topLevelWindow
protected static final java.lang.String TESTDATA_SPECIALFRAMESTATE
protected static final java.lang.String TESTDATA_SPECIALFRAMESTATE_DESCRIPTION
protected JavaGuiProxy processMouseEventHandler
protected static final java.lang.String ROLEINDEX
protected static final int ROLEINDEXWEIGHT
| Constructor Detail |
|---|
public JavaGuiProxy(java.lang.Object theObjectInTheSUT)
| Method Detail |
|---|
public java.lang.String getTestObjectClassName()
getTestObjectClassName in interface IProxyBasegetTestObjectClassName in class JavaProxypublic abstract java.lang.String getDescriptiveName()
getDescriptiveName in class JavaProxypublic boolean shouldBeMapped()
shouldBeMapped in class JavaProxypublic abstract ProxyTestObject getParent()
getParent in class JavaProxypublic abstract java.lang.Object getParentObject()
null if this
object has no parent.
getParentObject in class JavaProxypublic abstract ProxyTestObject getMappableParent()
getMappableParent in class JavaProxypublic com.rational.test.ft.object.interfaces.ITopWindow getTopWindow()
public com.rational.test.ft.object.interfaces.ITopWindow getTopMappableWindow()
public abstract java.util.Enumeration getChildrenEnumeration()
getChildrenEnumeration in class JavaProxypublic abstract java.util.Enumeration getImmediateChildren()
getImmediateChildren in class JavaProxypublic void setTopLevelWindow(com.rational.test.ft.sys.graphical.TopLevelWindow tlw)
the - TopLevelWindow.public com.rational.test.ft.sys.graphical.TopLevelWindow getRegisteredTopLevelWindow()
public void setProcessMouseEventHandler(JavaGuiProxy proxy)
public JavaGuiProxy getProcessMouseEventHandler()
public void processMouseEvent(IMouseActionInfo action)
processMouseEvent in class JavaProxyaction - The event cache and other mouse state information
for this mouse action.MethodSpecificationprotected void processHoverMouseEvent(IMouseActionInfo action)
public void processSingleMouseEvent(IMouseActionInfo action)
protected boolean modifiersChanged(IMouseActionInfo action)
protected void dumpAction(java.lang.String header, IMouseActionInfo action)
public int getCachedRectX(IMouseActionInfo action)
public int getCachedRectY(IMouseActionInfo action)
public com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
IGraphical.getScreenPoint is returned. However, if a proxy can find
getMethodSpecForPoint in class JavaProxyx - The screen relative x coordinate.y - The screen relative y coordinate.MethodSpecificationpublic abstract boolean isShowing()
isShowing in interface com.rational.test.ft.object.interfaces.IGraphicalpublic abstract boolean isEnabled()
isEnabled in interface com.rational.test.ft.object.interfaces.IGraphicalpublic com.rational.test.ft.script.ScriptCommandFlags getScriptCommandFlags()
getScriptCommandFlags in class ProxyTestObjectpublic boolean isOpaque()
isOpaque in interface com.rational.test.ft.object.interfaces.IGraphicalpublic abstract boolean hasFocus()
hasFocus in interface com.rational.test.ft.object.interfaces.IGraphicalpublic boolean isPointInObject(java.awt.Point pt)
This functionality is performed by the proxy due to potentially
unusual aspects associated with functionality. While typically the getScreenRectangle is used to resolve this query, there are situations for which this
is not accurate. For instance if the clickable region on a
button is not rectangular, just checking if the point is in
the rectangle is not be valid.
isPointInObject in interface com.rational.test.ft.object.interfaces.IGraphicalpt - Screen relative point to check.
getScreenRectangle()protected boolean isPointInObject(java.awt.Point pt, java.awt.Rectangle screenRect)
public java.lang.Object getChildAtPoint(java.awt.Point pt)
If this object has no children, it should return null.
getChildAtPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpt - Screen relative point to check.
getScreenRectangle()public abstract java.awt.Rectangle getScreenRectangle()
getScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalIGraphical.isPointInObject(java.awt.Point),
IGraphical.getClippedScreenRectangle()public java.awt.Rectangle getClippedScreenRectangle()
com.rational.test.ft.object.interfaces.IGraphicalTestObject
getClippedScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalnull if the object cannot be seen
in any window on the screen.IGraphical.getScreenRectangle()public java.awt.Rectangle getClippedRect(java.awt.Rectangle childRect)
public java.awt.Point getScreenPoint()
getScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpublic java.awt.Point getScreenPoint(java.awt.Point pt)
getScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpt - The Object relative point.
protected java.awt.Rectangle getActionRect()
public boolean ensureObjectIsVisible()
public void scrollRectToVisible(java.awt.Rectangle rect)
protected void activateTopWindow()
public void click()
click in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void click(com.rational.test.ft.script.MouseModifiers modifiers)
click in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void click(java.awt.Point pt)
click in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void click(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
click in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void doubleClick()
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers)
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void doubleClick(java.awt.Point pt)
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void doubleClick(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
doubleClick in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void nClick(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
nClick in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void drag()
drag in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void drag(com.rational.test.ft.script.MouseModifiers modifiers)
drag in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void drag(java.awt.Point pt1, java.awt.Point pt2)
drag in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void drag(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
drag in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void nClickDrag(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
nClickDrag in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void dragToScreenPoint(java.awt.Point screenPt)
TestObject.
The action is performed from a valid point within this TestObject to
the screen relative screenPt coordinates.
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void dragToScreenPoint(java.awt.Point objectPt, java.awt.Point screenPt)
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void dragToScreenPoint(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
dragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void nClickDragToScreenPoint(int clickCount, com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
nClickDragToScreenPoint in interface com.rational.test.ft.object.interfaces.IGraphicalprotected boolean isDrag(IMouseActionInfo action)
public void mouseMove(java.awt.Point pt)
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void mouseMove(com.rational.test.ft.script.MouseModifiers modifiers, java.awt.Point pt)
mouseMove in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void hover(double secondDelay)
hover in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void hover(double secondDelay, java.awt.Point pt)
hover in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void hover()
hover in interface com.rational.test.ft.object.interfaces.IGraphicalpublic void hover(java.awt.Point pt)
hover in interface com.rational.test.ft.object.interfaces.IGraphical
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||