IBM Rational Functional Tester
Version 8.2.1
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.object.interfaces.WPF
Class WpfGuiTestObject

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.WPF.WpfVisualTestObject
                  extended by com.rational.test.ft.object.interfaces.WPF.WpfGuiTestObject
All Implemented Interfaces:
IGraphical, IWpfGraphical
Direct Known Subclasses:
WpfFrameTestObject, WpfStatelessGuiSubitemTestObject, WpfToggleTestObject

public class WpfGuiTestObject
extends WpfVisualTestObject
implements IWpfGraphical

The WPF core class for modeling GUI components. All WPF GUI objects must extend this class.

Since:
RFT8.0

Field Summary
 
Fields inherited from class com.rational.test.ft.object.interfaces.TestObject
ignoreTheObjectState, ref
 
Constructor Summary
WpfGuiTestObject()
          For internal use.
WpfGuiTestObject(SpyMappedTestObject mappedObject)
          For internal use.
WpfGuiTestObject(SpyMappedTestObject mappedObject, TestObject anchor)
          For internal use.
WpfGuiTestObject(SpyMappedTestObject mappedObject, TestObject anchor, long scriptCommandFlags)
          For internal use.
 
Method Summary
 void click(DPoint pt)
          Clicks at a given DPoint
 void click(MouseModifiers modifiers, DPoint pt)
          Performs a click on the specified coordinates, relative to the associated TestObject.
 void doubleClick(DPoint pt)
          Performs a left-mouse double-click on the specified DPoint
 void doubleClick(MouseModifiers modifiers, DPoint pt)
          Performs a double-click on the specified coordinates, relative to the associated TestObject
 void drag(DPoint pt1, DPoint pt2)
          Performs a (left button) mouse drag action against the associated TestObject.
 void drag(MouseModifiers modifiers, DPoint pt1, DPoint pt2)
          Performs a mouse drag action against the associated TestObject
 void dragToScreenPoint(DPoint screenPt)
          Performs a drag to the specified DPoint on the screen
 void dragToScreenPoint(DPoint objectPt, DPoint screenPt)
          Performs a drag from an object point to a screen point
 void dragToScreenPoint(DPoint objectPt, java.awt.Point screenPt)
          Performs a drag from an object point to a screen point
 void dragToScreenPoint(MouseModifiers modifiers, DPoint objectPt, DPoint screenPt)
          Performs a drag from an object point to a screen point
 void dragToScreenPoint(MouseModifiers modifiers, DPoint objectPt, java.awt.Point screenPt)
          Performs a drag from an object point to a screen point
 java.lang.Object getChildAtPoint(DPoint pt)
          Finds the child object that is at the specified DPoint.
 java.awt.Point getScreenPoint(DPoint pt)
          Returns the screen-relative Point, given an object relative DPoint.
 void hover(double secondDelay, DPoint pt)
          Hovers the mouse over the specified coordinates of the associated TestObject
 void hover(DPoint pt)
          Hovers the mouse over the specified coordinates of the associated TestObject
 boolean isPointInObject(DPoint pt)
          Determines whether the specified screen-relative DPoint is contained in the component under evaluation.
 void mouseMove(DPoint pt)
          Performs a MOUSE_LEFT move action against the associated TestObject
 void mouseMove(MouseModifiers modifiers, DPoint pt)
          Performs a MOUSE_LEFT move action against the associated TestObject
 void nClick(int clickCount, MouseModifiers modifiers, DPoint pt)
          Performs a mouse n-click action on the specified coordinates, relative to the associated TestObject.
 void nClickDrag(int clickCount, MouseModifiers modifiers, DPoint pt1, DPoint pt2)
          Performs a mouse n-click drag action from and to the specified coordinates, relative to the associated TestObject
 void nClickDragToScreenPoint(int clickCount, MouseModifiers modifiers, DPoint objectPt, DPoint screenPt)
          Performs a n-click drag from an object point to a screen point
 void nClickDragToScreenPoint(int clickCount, MouseModifiers modifiers, DPoint objectPt, java.awt.Point screenPt)
          Performs a n-click drag from an object point to a screen point
 
Methods inherited from class com.rational.test.ft.object.interfaces.WPF.WpfVisualTestObject
GetChildrenAtPoint, GetLogicalChildren, GetLogicalParent, GetVisualChildren, GetVisualParent
 
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, ensureObjectIsVisible, getChildAtPoint, getClippedScreenRectangle, getImage, getImage, getIWindow, getRole, getScreenPoint, getScreenPoint, getScreenRectangle, getScreenSnapshot, getVisibleArea, 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, getProperty, getTestDataTypes, 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, getObjectClassName, getObjectCustomClassName, getObjectReference, getOwnedObjects, getOwner, getParent, getProcess, getProperties, getPropertyFromMap, getRecognitionProperties, getRecognitionPropertyWeight, getScriptCommandFlags, getStandardProperties, getTestData, getTopMappableParent, getTopParent, hashCode, invoke, invoke, invoke, invokeProxy, invokeProxy, isLoggedDuringUnregister, isMappedObject, isSameObject, isScreenTestObject, isTopLevelTestObject, performTest, performTest, performTest, performTest, setIndexer, setIndexer, setLoggedDuringUnregister, setMapProperties, setProperty, toString, updateTestData, waitForExistence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rational.test.ft.object.interfaces.IGraphical
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, drag, drag, drag, drag, dragToScreenPoint, dragToScreenPoint, dragToScreenPoint, getChildAtPoint, getClippedScreenRectangle, getScreenPoint, getScreenPoint, getScreenRectangle, hasFocus, hover, hover, hover, hover, isEnabled, isOpaque, isPointInObject, isShowing, mouseMove, mouseMove, nClick, nClickDrag, nClickDragToScreenPoint
 

Constructor Detail

WpfGuiTestObject

public WpfGuiTestObject()
For internal use.

Since:
RFT8.0

WpfGuiTestObject

public WpfGuiTestObject(SpyMappedTestObject mappedObject,
                        TestObject anchor,
                        long scriptCommandFlags)
For internal use.

Since:
RFT8.0

WpfGuiTestObject

public WpfGuiTestObject(SpyMappedTestObject mappedObject,
                        TestObject anchor)
For internal use.

Since:
RFT8.0

WpfGuiTestObject

public WpfGuiTestObject(SpyMappedTestObject mappedObject)
For internal use.

Since:
RFT8.0
Method Detail

isPointInObject

public boolean isPointInObject(DPoint pt)
Determines whether the specified screen-relative DPoint is contained in the component under evaluation.

Specified by:
isPointInObject in interface IWpfGraphical
Parameters:
pt - - the DPoint which needs to checked
Returns:
boolean : true if the component contains the point; false otherwise.
Detail description:
The DPoint is relative to the top-left corner of the screen and not to the object itself, or its parent. Although getScreenRectangle is typically used to resolve this query, there are situations for which this is not accurate. For example, if the clickable region on a button is not rectangular, checking only whether the point is in the rectangle would yield an invalid result.
Since:
RFT8.0
See Also:
GuiTestObject.getScreenRectangle(), com.rational.test.ft.value.DPoint}

getChildAtPoint

public java.lang.Object getChildAtPoint(DPoint pt)
Finds the child object that is at the specified DPoint.

Specified by:
getChildAtPoint in interface IWpfGraphical
Parameters:
pt - - the DPoint where the child object is required
Returns:
java.lang.Object - The object at the point, or null if no child object is found.
Detail description:
The DPoint is relative to the top-left corner of the screen and not to the component itself, or its parent.
Since:
RFT8.0
See Also:
GuiTestObject.getScreenRectangle(), com.rational.test.ft.value.DPoint}

getScreenPoint

public java.awt.Point getScreenPoint(DPoint pt)
Returns the screen-relative Point, given an object relative DPoint.

Specified by:
getScreenPoint in interface IWpfGraphical
Parameters:
pt - - The object-relative DPoint
Returns:
java.awt.Point - The screen relative DPoint
Detail description:
The input parameter is with respect to the object. This will convert it into a point with respect to the screen.

Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#getScreenPoint(com.rational.test.ft.value.DPoint)}, com.rational.test.ft.value.DPoint}

click

public void click(DPoint pt)
Clicks at a given DPoint

Specified by:
click in interface IWpfGraphical
Parameters:
pt - - The DPoint where a click needs to be done.
Detail description:
This will do a left-mouse click at the specified Dpoint, relative to the TestObject.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#click(DPoint)}, com.rational.test.ft.value.DPoint}

click

public void click(MouseModifiers modifiers,
                  DPoint pt)
Performs a click on the specified coordinates, relative to the associated TestObject.

Specified by:
click in interface IWpfGraphical
Parameters:
pt: - The DPoint where a click needs to be done
modifiers: - MouseModifiers object.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#click(MouseModifiers, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}

doubleClick

public void doubleClick(DPoint pt)
Performs a left-mouse double-click on the specified DPoint

Specified by:
doubleClick in interface IWpfGraphical
Parameters:
pt: - The DPoint where a click needs to be done
Detail description:
This locates the Dpoint which is relative to the associated TestObject and performs a left - mouse double click at that location.

Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#doubleClick(DPoint)}, com.rational.test.ft.value.DPoint}

doubleClick

public void doubleClick(MouseModifiers modifiers,
                        DPoint pt)
Performs a double-click on the specified coordinates, relative to the associated TestObject

Specified by:
doubleClick in interface IWpfGraphical
Parameters:
pt: - The DPoint where a double click needs to be done,
modifiers: - MouseModifiers object.
Detail description:
Performs a double click at the point. The type of mouse click can be govered using the MouseModifiers.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#doubleClick(MouseModifiers, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}

nClick

public void nClick(int clickCount,
                   MouseModifiers modifiers,
                   DPoint pt)
Performs a mouse n-click action on the specified coordinates, relative to the associated TestObject.

Specified by:
nClick in interface IWpfGraphical
Parameters:
clickCount - - Number of clicks to be performed.
modifiers - - MouseModifiers object to set the type of click.
pt - - The DPoint where a click needs to be done.
Detail description:
Performs a n-click at the given DPoint. The type of mouse click can be governed using the MouseModifiers
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#nClick(int, MouseModifiers, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}

drag

public void drag(DPoint pt1,
                 DPoint pt2)
Performs a (left button) mouse drag action against the associated TestObject.

Specified by:
drag in interface IWpfGraphical
Parameters:
pt1 - - The initial DPoint
pt2 - - The final DPoint
Detail description:
The drag action is performed from one DPoint to the other DPoint.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#drag(DPoint, DPoint)}, com.rational.test.ft.value.DPoint}

drag

public void drag(MouseModifiers modifiers,
                 DPoint pt1,
                 DPoint pt2)
Performs a mouse drag action against the associated TestObject

Specified by:
drag in interface IWpfGraphical
Parameters:
modifiers - - MouseModifiers object to set the type of drag
pt1 - - The initial DPoint
pt2 - - The final DPoint
Detail description:
The drag action is performed from one DPoint to the other DPoint. The drag specifications can be modified in the MouseModifiers
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#drag(DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}

nClickDrag

public void nClickDrag(int clickCount,
                       MouseModifiers modifiers,
                       DPoint pt1,
                       DPoint pt2)
Performs a mouse n-click drag action from and to the specified coordinates, relative to the associated TestObject

Specified by:
nClickDrag in interface IWpfGraphical
Parameters:
modifiers - - MouseModifiers object to set the type of drag
pt1 - - The initial DPoint
pt2 - - The final DPoint
clickCount - - number of clicks to be done
Detail description:
The drag action is performed from one DPoint to the other DPoint.The drag specifications can be modified in the MouseModifiers
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#drag(DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}

dragToScreenPoint

public void dragToScreenPoint(DPoint screenPt)
Performs a drag to the specified DPoint on the screen

Specified by:
dragToScreenPoint in interface IWpfGraphical
Parameters:
screenPt - - The final DPoint
Detail description:
Performs a MOUSE_LEFT drag action on the associated TestObject. The action is performed from a valid point within this TestObject to the screen-relative DPoint.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#dragToScreenPoint(DPoint)}, com.rational.test.ft.value.DPoint}

dragToScreenPoint

public void dragToScreenPoint(DPoint objectPt,
                              java.awt.Point screenPt)
Performs a drag from an object point to a screen point

Parameters:
objectPt - - The DPoint on the Object, relative to the object
screenPt - - The screen relative java.awt.Point
Detail description:
Performs a MOUSE_LEFT drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to the screen-relative point.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#dragToScreenPoint(DPoint, DPoint)}, com.rational.test.ft.value.DPoint}

dragToScreenPoint

public void dragToScreenPoint(DPoint objectPt,
                              DPoint screenPt)
Performs a drag from an object point to a screen point

Specified by:
dragToScreenPoint in interface IWpfGraphical
Parameters:
objectPt - - The initial DPoint on the Object, relative to the object
screenPt - - The final DPoint relative to the screen.
Detail description:
Performs a MOUSE_LEFT drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to a DPoint relative to the screen
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#dragToScreenPoint(DPoint, DPoint)}, com.rational.test.ft.value.DPoint}

dragToScreenPoint

public void dragToScreenPoint(MouseModifiers modifiers,
                              DPoint objectPt,
                              java.awt.Point screenPt)
Performs a drag from an object point to a screen point

Parameters:
modifiers - - MouseModifiers object to set the type of drag
objectPt - - The initial DPoint on the Object, relative to the object
screenPt - - The final java.awt.Point relative to the screen.
Detail description:
Performs a drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to a point relative to the screen
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#dragToScreenPoint(MouseModifiers, DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}, com.rational.test.ft.object.interfaces.GuiTestObject#dragToScreenPoint(MouseModifiers, java.awt.Point, java.awt.Point)

dragToScreenPoint

public void dragToScreenPoint(MouseModifiers modifiers,
                              DPoint objectPt,
                              DPoint screenPt)
Performs a drag from an object point to a screen point

Specified by:
dragToScreenPoint in interface IWpfGraphical
Parameters:
modifiers - - MouseModifiers object to set the type of drag
objectPt - - The initial DPoint on the Object, relative to the object
screenPt - - The final DPoint relative to the screen.
Detail description:
Performs a drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to a DPoint relative to the screen
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#dragToScreenPoint(MouseModifiers, DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}, com.rational.test.ft.object.interfaces.GuiTestObject#dragToScreenPoint(MouseModifiers, java.awt.Point, java.awt.Point)

nClickDragToScreenPoint

public void nClickDragToScreenPoint(int clickCount,
                                    MouseModifiers modifiers,
                                    DPoint objectPt,
                                    java.awt.Point screenPt)
Performs a n-click drag from an object point to a screen point

Parameters:
clickCount - - Number of clicks to be performed.
modifiers - - MouseModifiers object to set the type of drag
objectPt - - The initial DPoint on the Object, relative to the object
screenPt - - The final java.awt.Point relative to the screen.
Detail description:
Performs a n- click drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to a point relative to the screen
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#nClickDragToScreenPoint(int, MouseModifiers, DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}, com.rational.test.ft.object.interfaces.GuiTestObject#dragToScreenPoint(MouseModifiers, java.awt.Point, java.awt.Point)

nClickDragToScreenPoint

public void nClickDragToScreenPoint(int clickCount,
                                    MouseModifiers modifiers,
                                    DPoint objectPt,
                                    DPoint screenPt)
Performs a n-click drag from an object point to a screen point

Specified by:
nClickDragToScreenPoint in interface IWpfGraphical
Parameters:
clickCount - - Number of clicks to be performed.
modifiers - - MouseModifiers object to set the type of drag
objectPt - - The initial DPoint on the Object, relative to the object
screenPt - - The final DPoint relative to the screen.
Detail description:
Performs a n- click drag action against the associated TestObject. The action is performed from a DPoint relative to this TestObject, to a DPoint relative to the screen
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.WPF.IWpfGraphical#nClickDragToScreenPoint(int, MouseModifiers, DPoint, DPoint)}, com.rational.test.ft.value.DPoint}, com.rational.test.ft.script.MouseModifiers}, com.rational.test.ft.object.interfaces.GuiTestObject#dragToScreenPoint(MouseModifiers, java.awt.Point, java.awt.Point)

mouseMove

public void mouseMove(DPoint pt)
Performs a MOUSE_LEFT move action against the associated TestObject

Specified by:
mouseMove in interface IWpfGraphical
Detail description:
The action is performed from current mouse coordinates to the specified DPoint relative to this TestObject
Since:
RFT8.0
See Also:
com.rational.test.ft.value.DPoint}, com.rational.test.ft.object.interfaces.GuiTestObject#mouseMove(java.awt.Point)}

mouseMove

public void mouseMove(MouseModifiers modifiers,
                      DPoint pt)
Performs a MOUSE_LEFT move action against the associated TestObject

Specified by:
mouseMove in interface IWpfGraphical
Parameters:
modifiers - - MouseModifiers object
pt - - The final DPoint relative to the TestObject
Detail description:
The action is performed from current mouse coordinates to the specified DPoint relative to this TestObject
Since:
RFT8.0
See Also:
com.rational.test.ft.value.DPoint}, com.rational.test.ft.object.interfaces.GuiTestObject#mouseMove(java.awt.Point)}

hover

public void hover(DPoint pt)
Hovers the mouse over the specified coordinates of the associated TestObject

Specified by:
hover in interface IWpfGraphical
Parameters:
pt - - The Dpoint relative to the object
Detail description:
The mouse is moved to the object, relative to the coordinates of the TestObject. It stays there for the default length of time.
Since:
RFT8.0
See Also:
com.rational.test.ft.object.interfaces.GuiTestObject#hover(java.awt.Point)}, com.rational.test.ft.value.DPoint}

hover

public void hover(double secondDelay,
                  DPoint pt)
Hovers the mouse over the specified coordinates of the associated TestObject

Specified by:
hover in interface IWpfGraphical
Parameters:
secondDelay - - The time period for Hover in seconds.
pt - - The Dpoint where Hover needs to done, relative to the object.
Detail description:
The mouse is moved to the DPoint, relative to TestObject. It stays there for at least the specified number of seconds.
Since:
RFT8.0
See Also:
com.rational.test.ft.value.DPoint}, com.rational.test.ft.object.interfaces.GuiTestObject#hover(double, java.awt.Point)}