public abstract class JavaGuiProxy extends JavaProxy implements com.rational.test.ft.object.interfaces.IGraphical
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. |
| Modifier and Type | Field and Description |
|---|---|
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 |
BROWSERTABTESTOBJECT_CLASSNAME, BROWSERTESTOBJECT_CLASSNAME, COLORDIALOGTESTOBJECT_CLASSNAME, CROSSDOMAINCONTAINER_CLASSNAME, DOCUMENTTESTOBJECT_CLASSNAME, DOMAINTESTOBJECT_CLASSNAME, ECLIPSETOPLEVELTESTOBJECT_CLASSNAME, EMBEDDEDBROWSERTESTOBJECT_CLASSNAME, FILEDIALOGTESTOBJECT_CLASSNAME, FRAMESUBITEMTESTOBJECT_CLASSNAME, FRAMETESTOBJECT_CLASSNAME, GEFEDITPARTTESTOBJECT_CLASSNAME, GUISUBITEMTESTOBJECT_CLASSNAME, GUITESTOBJECT_CLASSNAME, INTERNALFRAMETESTOBJECT_CLASSNAME, MESSAGEBOXTESTOBJECT_CLASSNAME, PALETTEGUISUBITEMTESTOBJECT_CLASSNAME, PROCESSTESTOBJECT_CLASSNAME, SCROLLSUBITEMTESTOBJECT_CLASSNAME, SCROLLTESTOBJECT_CLASSNAME, SELECTGUISUBITEMTESTOBJECT_CLASSNAME, SELECTSCROLLGUISUBITEMTESTOBJECT_CLASSNAME, SHELLTESTOBJECT_CLASSNAME, STATELESSGUISUBITEMTESTOBJECT_CLASSNAME, SUBITEMTESTOBJECT_CLASSNAME, TABITEMTESTOBJECT_CLASSNAME, TESTOBJECT_CLASSNAME, TEXTGUISUBITEMTESTOBJECT_CLASSNAME, TEXTGUITESTOBJECT_CLASSNAME, TEXTSCROLLTESTOBJECT_CLASSNAME, TEXTSELECTGUISUBITEMTESTOBJECT_CLASSNAME, TIMEOUTTESTOBJECT_CLASSNAME, TOGGLEGUITESTOBJECT_CLASSNAME, TOGGLETESTOBJECT_CLASSNAME, TOPLEVELSUBITEMTESTOBJECT_CLASSNAME, TOPLEVELTESTOBJECT_CLASSNAME, TRACKBARTESTOBJECT_CLASSNAME, vomClippedRectangle| Constructor and Description |
|---|
JavaGuiProxy(java.lang.Object theObjectInTheSUT)
This sole constructor for all proxy objects sets the SUT object
as a member variable for the proxy.
|
| Modifier and Type | Method and Description |
|---|---|
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,
com.rational.test.ft.domain.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(com.rational.test.ft.domain.IMouseActionInfo action) |
int |
getCachedRectY(com.rational.test.ft.domain.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() |
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 com.rational.test.ft.domain.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 com.rational.test.ft.domain.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.
|
java.lang.Object |
invokeMethodOnEDT(java.lang.Object[] args) |
protected boolean |
isDrag(com.rational.test.ft.domain.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(com.rational.test.ft.domain.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(com.rational.test.ft.domain.IMouseActionInfo action) |
void |
processMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
Return a MethodSpecification for the specified mouse event.
|
void |
processSingleMouseEvent(com.rational.test.ft.domain.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.
|
addMappableChildrenToVector, addRecognitionProperty, allowProperty, childConstructed, getAddedRecognitionPropertyValue, getChildren, getIndexer, getIndexers, getMappableChildren, getMethods, getNonValueProperties, getOwnedObjects, getOwner, getProperties, getProperty, getRecognitionProperties, getRecognitionPropertyWeight, getRole, getStandardProperties, getTestDataTypes, getTestDomain, getTopMappableParent, getTopParent, getUniqueId, getVisualClippableParent, hasAddedRecognitionProperties, isRecognitionProperty, setIndexer, setPropertyaddDataDrivableCommands, baseClassMatch, canTakeVP, equals, findChildrenWithProperties, findChildrenWithPropertiesAndInvoke, getChannel, getChildren, getDataDrivableCommand, getDataDrivableCommands, getElementWithFocus, getField, getIgnorableProperties, getMappableChildren, getMappableParent, getObjectClassName, getObjectCustomClassName, getOwnedObjects, getParent, getProxy, getScriptCommandAnchor, getTestData, getVisualClippedRectangle, getVisualMappableChildren, getVisualTopParent, getVOMSpecificProperty, hasSpecialFrameState, isClassIndexConsidered, isSameObject, isValidObject, ping, suppressKeyAction, updateTestDataprotected 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
public JavaGuiProxy(java.lang.Object theObjectInTheSUT)
public java.lang.String getTestObjectClassName()
getTestObjectClassName in interface com.rational.test.ft.domain.IProxyBasegetTestObjectClassName in class JavaProxypublic abstract java.lang.String getDescriptiveName()
getDescriptiveName in class JavaProxypublic boolean shouldBeMapped()
shouldBeMapped in class JavaProxypublic abstract com.rational.test.ft.domain.ProxyTestObject getParent()
public abstract java.lang.Object getParentObject()
null if this
object has no parent.getParentObject in class JavaProxypublic abstract com.rational.test.ft.domain.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(com.rational.test.ft.domain.IMouseActionInfo action)
processMouseEvent in class JavaProxyaction - The event cache and other mouse state information
for this mouse action.MethodSpecificationprotected void processHoverMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
public void processSingleMouseEvent(com.rational.test.ft.domain.IMouseActionInfo action)
protected boolean modifiersChanged(com.rational.test.ft.domain.IMouseActionInfo action)
protected void dumpAction(java.lang.String header,
com.rational.test.ft.domain.IMouseActionInfo action)
public int getCachedRectX(com.rational.test.ft.domain.IMouseActionInfo action)
public int getCachedRectY(com.rational.test.ft.domain.IMouseActionInfo action)
public com.rational.test.ft.sys.MethodSpecification getMethodSpecForPoint(java.awt.Point pt)
IGraphical.getScreenPoint is returned. However, if a proxy can findgetMethodSpecForPoint 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 com.rational.test.ft.domain.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.IGraphicalpublic java.awt.Rectangle getClippedScreenRectangle()
getClippedScreenRectangle in interface com.rational.test.ft.object.interfaces.IGraphicalpublic 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(com.rational.test.ft.domain.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.IGraphicalpublic java.lang.Object invokeMethodOnEDT(java.lang.Object[] args)
args - is an array that would hold an Object Array where
Element at 0-index would be the method name to be invoked
Element at 1-index would be the signature of the method
Remaining args would be the arguments to be passed to the method to be invoked.