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

Class WpfGuiTestObject

    • Constructor Detail

      • WpfGuiTestObject

        public WpfGuiTestObject()
        For internal use.
        Since:
        RFT8.0
      • WpfGuiTestObject

        public WpfGuiTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,
                                TestObject anchor,
                                long scriptCommandFlags)
        For internal use.
        Since:
        RFT8.0
      • WpfGuiTestObject

        public WpfGuiTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject,
                                TestObject anchor)
        For internal use.
        Since:
        RFT8.0
      • WpfGuiTestObject

        public WpfGuiTestObject(com.rational.test.ft.object.map.SpyMappedTestObject mappedObject)
        For internal use.
        Since:
        RFT8.0
      • WpfGuiTestObject

        public WpfGuiTestObject(TestObject obj)
        For internal use.
        Since:
        RFT8.0
      • WpfGuiTestObject

        public WpfGuiTestObject(com.rational.test.ft.object.TestObjectReference ref)
        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)}