public interface IScreen extends IGraphical
Screen
object. This interface is part of the native-window
management system; any use of this interface is likely to be platform specific.
IWindow
is a wrapper that abstract the common underlying platform methods.RootTestObject.getScreen()
,
IWindow
Modifier and Type | Method and Description |
---|---|
IWindow |
getActiveWindow()
Returns the current active window.
|
java.awt.Point |
getMousePosition()
Returns the current screen location of the mouse pointer.
|
void |
inputChars(java.lang.String characters)
Sends the characters to the current active window
|
void |
inputKeys(java.lang.String keys)
Sends the key events to the current active window.
|
IWindow |
windowFromHandle(long handle)
Returns a window object when given a native window handle.
|
IWindow |
windowFromPoint(java.awt.Point point)
Returns a IWindow object at the given screen point.
|
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
IWindow windowFromHandle(long handle)
handle
- The handle for the objectIWindow
object
long handle = 262476; //Handle for a window
IScreen scr = getRootTestObject().getScreen();
IWindow win =scr.getwindowFromHandle(handle);
IWindow windowFromPoint(java.awt.Point point)
point
- java.awt.Point The point on the screenIWindow
object when given a point.
If the screen point is on a child window, the
child, not the parent, is returned.
java.awt.Point pt = new java.awt.Point(10,10);
IScreen scr = getRootTestObject().getScreen();
IWindow win =scr.windowFromPoint(pt);
IWindow getActiveWindow()
IWindow
in the screen.
The API can come to help in cases when the dialogs are not recognized.java.awt.Point getMousePosition()
void inputKeys(java.lang.String keys)
keys
- java.lang.String The keys to be sent to the current active windowinputKeys
.void inputChars(java.lang.String characters)
characters
- java.lang.String The characters to be sent to the current active windowinputKeys
) is used. No window activation implicitly occurs.