IBM Rational Functional Tester
Version 6.1
IBM Rational Functional Tester API Reference

Project Version 2.0

com.rational.test.ft.object.interfaces
Interface IGraphical

All Known Subinterfaces:
IFileDialog, IFrame, IInternalFrame, IScreen, ITopWindow, IWindow
All Known Implementing Classes:
FileDialogTestObject, FrameSubitemTestObject, FrameTestObject, GuiTestObject, InternalFrameTestObject, TextGuiSubitemTestObject, TextGuiTestObject, TopLevelSubitemTestObject, TopLevelTestObject

public interface IGraphical

Supported by all GUI objects. The associated object to this interface is GuiTestObject. Other objects, such as GuiSubitemTestObject, extend the base class GuiTestObject.

Since:
RFT1.0

Method Summary
 void click()
          Performs a left-mouse click on the center point of the associated TestObject.
 void click(MouseModifiers modifiers)
          Performs a left-mouse click on the specified object, relative to coordinates within the associated TestObject.
 void click(MouseModifiers modifiers, java.awt.Point pt)
          Performs a left-mouse click on the specified coordinates, relative to the associated TestObject.
 void click(java.awt.Point pt)
          Performs a left-mouse click on the specified coordinates, relative to the associated TestObject.
 void doubleClick()
          Performs a left-mouse double-click on the center point of the associated TestObject.
 void doubleClick(MouseModifiers modifiers)
          Performs a left-mouse double-click on the specified object, relative to coordinates within the associated TestObject.
 void doubleClick(MouseModifiers modifiers, java.awt.Point pt)
          Performs a left-mouse double-click on the specified coordinates, relative to the associated TestObject.
 void doubleClick(java.awt.Point pt)
          Performs a left-mouse double-click on the specified coordinates, relative to the associated TestObject.
 void drag()
          Performs a MOUSE_LEFT drag action against the associated TestObject.
 void drag(MouseModifiers modifiers)
          Performs a drag action against the associated TestObject with the supplied set of mouse modifiers.
 void drag(MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
          Performs a drag action against the associated TestObject.
 void drag(java.awt.Point pt1, java.awt.Point pt2)
          Performs a MOUSE_LEFT drag action against the associated TestObject.
 void dragToScreenPoint(MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
          Performs 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)
          Performs a MOUSE_LEFT drag action against the associated TestObject.
 java.lang.Object getChildAtPoint(java.awt.Point pt)
          Finds the child object that is at the specified point.
 java.awt.Rectangle getClippedScreenRectangle()
          Returns the clipped-screen rectangle for the associated TestObject, relative to the top-left corner of the screen.
 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.
 java.awt.Rectangle getScreenRectangle()
          Returns the rectangle that contains the component being evaluated, relative to the top-left corner of the screen.
 boolean hasFocus()
          Determines whether the component under evaluation has keyboard focus.
 void hover()
          Hovers the mouse over the center of the associated TestObject.
 void hover(double secondDelay)
          Hovers the mouse over the center of the associated TestObject.
 void hover(double secondDelay, java.awt.Point pt)
          Hovers the mouse over the specified coordinates of the associated TestObject.
 void hover(java.awt.Point pt)
          Hovers the mouse over the specified coordinates of the associated TestObject.
 boolean isEnabled()
          Determines whether the component under evaluation is enabled.
 boolean isOpaque()
          Determines whether the component under evaluation is opaque.
 boolean isPointInObject(java.awt.Point pt)
          Determines whether the specified screen-relative point is contained in the component under evaluation.
 boolean isShowing()
          Determine's whether the component under evaluation is showing.
 void mouseMove(MouseModifiers modifiers, java.awt.Point pt)
          Performs a Move action against the associated TestObject.
 void mouseMove(java.awt.Point pt)
          Performs a MOUSE_LEFT move action against the associated TestObject.
 void nClick(int clickCount, MouseModifiers modifiers, java.awt.Point pt)
          Performs a mouse n-click action on the specified coordinates, relative to the associated TestCode.
 void nClickDrag(int clickCount, MouseModifiers modifiers, java.awt.Point pt1, java.awt.Point pt2)
          Performs a mouse n-click drag action on the specified coordinates, relative to the associated TestObject.
 void nClickDragToScreenPoint(int clickCount, MouseModifiers modifiers, java.awt.Point objectPt, java.awt.Point screenPt)
          Performs a mouse n-click drag action on the specified coordinates, relative the screen-relative screenPt coordinates.
 

Method Detail

isShowing

public boolean isShowing()
Determine's whether the component under evaluation is showing.

Returns:
true if the component is showing; false otherwise.
Since:
RFT1.0

isEnabled

public boolean isEnabled()
Determines whether the component under evaluation is enabled.

Returns:
true if the component is enabled; false otherwise.

isOpaque

public boolean isOpaque()
Determines whether the component under evaluation is opaque.

Returns:
true if the component is opaque; false otherwise.

hasFocus

public boolean hasFocus()
Determines whether the component under evaluation has keyboard focus.

Returns:
true if the component has keyboard focus; false otherwise.
Since:
RFT1.0

isPointInObject

public boolean isPointInObject(java.awt.Point pt)
Determines whether the specified screen-relative point is contained in the component under evaluation. Note that the point is relative to the top-left corner of the screen and not to the component itself, or its parent.

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, this is not accurate in certain situations. For example, if the clickable region on a button is not rectangular, just checking whether the point is in the rectangle would not yield a valid result.

Parameters:
pt - Screen-relative point to check
Returns:
true if component contains thePoint; false otherwise.
Since:
RFT1.0
See Also:
getScreenRectangle()

getChildAtPoint

public java.lang.Object getChildAtPoint(java.awt.Point pt)
Finds the child object that is at the specified point. Note that the point is relative to the top-left corner of the screen and not to the component itself or its parent.

Parameters:
pt - Screen-relative point to check
Returns:
The object at the point, or null if no child object is found
Since:
RFT1.0
See Also:
getScreenRectangle()

getScreenRectangle

public java.awt.Rectangle getScreenRectangle()
Returns the rectangle that contains the component being evaluated, relative to the top-left corner of the screen. This typically consists of two operations (getLocationOnScreen and getSize) combined into a single operation. The rectangle is exposed so that actions may be directly scripted against a visible GUI object. If the GUI object does not show, null is returned.

Since:
RFT1.0
See Also:
isPointInObject(java.awt.Point), getClippedScreenRectangle()

getClippedScreenRectangle

public java.awt.Rectangle getClippedScreenRectangle()
Returns the clipped-screen rectangle for the associated TestObject, relative to the top-left corner of the screen. While getScreenRectangle() returns the true rectangle of the TestObject, this method clips the true screen rectangle to the bounds of any clipping parent TestObject. Clipping parents, such as scroll panes or a browser window, may hide part or all of the true screen rectangle. Only the screen-level viewable rectangle is returned, or null if the object is not showing, or is completely clipped by a clipping parent.

Returns:
The clipped screen rectangle, or null if the object cannot be seen in any window on the screen.
Since:
RFT1.0
See Also:
getScreenRectangle()

getScreenPoint

public java.awt.Point getScreenPoint()
Returns the screen-relative point to a valid point within the object.

Since:
RFT1.0

getScreenPoint

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

Parameters:
pt - The object-relative point
Since:
RFT1.0

click

public void click()
Performs a left-mouse click on the center point of the associated TestObject. This method is a shortcut to the click method with a modifier parameter. (The modifier is set to MOUSE_LEFT).

Since:
RFT1.0

click

public void click(MouseModifiers modifiers)
Performs a left-mouse click on the specified object, relative to coordinates within the associated TestObject.

Since:
RFT1.0

click

public void click(java.awt.Point pt)
Performs a left-mouse click on the specified coordinates, relative to the associated TestObject. This method is a shortcut to the click method with a modifier parameter and coordinates. (The modifier is set to MOUSE_LEFT).

Since:
RFT1.0

click

public void click(MouseModifiers modifiers,
                  java.awt.Point pt)
Performs a left-mouse click on the specified coordinates, relative to the associated TestObject.

Since:
RFT1.0

doubleClick

public void doubleClick()
Performs a left-mouse double-click on the center point of the associated TestObject. This method is a shortcut to the doubleClick method with a modifier parameter. (The modifier is set to MOUSE_LEFT).

Since:
RFT1.0

doubleClick

public void doubleClick(MouseModifiers modifiers)
Performs a left-mouse double-click on the specified object, relative to coordinates within the associated TestObject.

Since:
RFT1.0

doubleClick

public void doubleClick(java.awt.Point pt)
Performs a left-mouse double-click on the specified coordinates, relative to the associated TestObject. This method is a shortcut to the doubleClick method with a modifier parameter and coordinates. (The modifier is set to MOUSE_LEFT).

Since:
RFT1.0

doubleClick

public void doubleClick(MouseModifiers modifiers,
                        java.awt.Point pt)
Performs a left-mouse double-click on the specified coordinates, relative to the associated TestObject.

Since:
RFT1.0

nClick

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

Since:
RFT1.0

drag

public void drag()
Performs a MOUSE_LEFT drag action against the associated TestObject. This method is used to simulate drag actions against controls that are typically not sensitive to drag actions.

Since:
RFT1.0

drag

public void drag(MouseModifiers modifiers)
Performs a drag action against the associated TestObject with the supplied set of mouse modifiers. This method is used to simulate drag actions against controls that are typically not sensitive to drag actions.

Since:
RFT1.0

drag

public void drag(java.awt.Point pt1,
                 java.awt.Point pt2)
Performs a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates, relative to this TestObject.

Since:
RFT10

drag

public void drag(MouseModifiers modifiers,
                 java.awt.Point pt1,
                 java.awt.Point pt2)
Performs a drag action against the associated TestObject. The action is performed from (x1, y1) to (x2, y2) coordinates, relative to this TestObject.


nClickDrag

public void nClickDrag(int clickCount,
                       MouseModifiers modifiers,
                       java.awt.Point pt1,
                       java.awt.Point pt2)
Performs a mouse n-click drag action on the specified coordinates, relative to the associated TestObject.

Since:
RFT1.0

dragToScreenPoint

public void dragToScreenPoint(java.awt.Point screenPt)
Performs a MOUSE_LEFT drag action against the associated TestObject. The action is performed from a valid point within this TestObject to the screen-relative screenPt coordinates.

Since:
RFT1.0

dragToScreenPoint

public void dragToScreenPoint(java.awt.Point objectPt,
                              java.awt.Point screenPt)
Performs a MOUSE_LEFT drag action against the associated TestObject. The action is performed from (x, y,) relative to this TestObject, to the screen-relative screenPt coordinates.

Since:
RFT1.0

dragToScreenPoint

public void dragToScreenPoint(MouseModifiers modifiers,
                              java.awt.Point objectPt,
                              java.awt.Point screenPt)
Performs a drag action against the associated TestObject. The action is performed from (x, y), relative to this TestObject to the screen-relative screenPt coordinates.

Since:
RFT1.0

nClickDragToScreenPoint

public void nClickDragToScreenPoint(int clickCount,
                                    MouseModifiers modifiers,
                                    java.awt.Point objectPt,
                                    java.awt.Point screenPt)
Performs a mouse n-click drag action on the specified coordinates, relative the screen-relative screenPt coordinates.

Since:
RFT1.0

mouseMove

public void mouseMove(java.awt.Point pt)
Performs a MOUSE_LEFT move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates, relative to this TestObject.


mouseMove

public void mouseMove(MouseModifiers modifiers,
                      java.awt.Point pt)
Performs a Move action against the associated TestObject. The action is performed from current mouse coordinates to (x, y) coordinates, relative to this TestObject.

Since:
RFT1.0

hover

public void hover(double secondDelay)
Hovers the mouse over the center of the associated TestObject. The mouse is moved to the center of the TestObject and stays there for at least the specified number of seconds.

Since:
RFT1.0

hover

public void hover()
Hovers the mouse over the center of the associated TestObject. The mouse is moved to the center of the TestObject and stays there for the default length of time.

Since:
RFT1.0

hover

public void hover(java.awt.Point pt)
Hovers the mouse over the specified coordinates of the associated TestObject. The mouse is moved to the object, relative to the coordinates of the TestObject. It stays there for the default length of time.

Since:
RFT1.0

hover

public void hover(double secondDelay,
                  java.awt.Point pt)
Hovers the mouse over the specified coordinates of the associated TestObject. The mouse is moved to the object, relative to the coordinates of the TestObject. It stays there for at least the specified number of seconds.

Since:
RFT1.0