public interface IMoveable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the window.
|
void |
closeSynchron()
Closes the window and waits until the window is closed.
|
void |
closeSynchron(boolean closeConfirm)
Closes the window and waits until the window is closed.
|
List<IMoveable> |
getCloseWindows()
Returns the windows that need to be closed in order so that only the main window of the application is open.
|
TestObject |
getFocus()
Returns the object with the input focus.
|
IMoveable |
getNextCloseWindow()
Returns the next window that need to be closed in order to close all windows of the application except the main window.
|
int |
getWindowState()
Gets the state of a window.
|
boolean |
isActive()
Returns whether the window is set to active.
|
void |
maximize()
Maximizes the window.
|
void |
minimize()
Reduces the window to an icon.
|
void |
move(Point pos)
Moves the window.
|
void |
restore()
Restores the window to its previous size.
|
void |
setActive()
Makes the window active.
|
void |
size(int width,
int height)
Resizes the window.
|
void close()
void closeSynchron()
The method attempts to close the window by trying the following events, in this sequence, stopping when the window closes:
close()
method on the window.closeConfirm
parameter is set to true
: Click the list of buttons specified with the option OPT_CLOSE_WINDOW_BUTTONS.This method supports several specifications you can make to help the Open Agent closes a window. You can make these specification by use Desktop.setOption(String, Object) to set the appropriate values for the mentioned options. For example, if closing the window opens a confirmation dialog with a button that contains the text "Do not save" use:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
Close may fail. For example, if closing a window causes the application to display a message box and closeConfirm is set to false
, or if the buttons used to close the message box are not covered under the OPT_CLOSE_CONFIRM_BUTTONS option, the call will fail and raise a CloseFailedException.
void closeSynchron(boolean closeConfirm)
The method attempts to close the window by trying the following events, in this sequence, stopping when the window closes:
close()
method on the window.closeConfirm
parameter is set to true
: Click the list of buttons specified with the option OPT_CLOSE_WINDOW_BUTTONS.This method supports several specifications you can make to help the Open Agent closes a window. You can make these specification by use Desktop.setOption(String, Object) to set the appropriate values for the mentioned options. For example, if closing the window opens a confirmation dialog with a button that contains the text "Do not save" use:
desktop.setOption(CommonOptions.OPT_CLOSE_CONFIRM_BUTTONS, Arrays.asList("Do not save"));
Close may fail. For example, if closing a window causes the application to display a message box and closeConfirm is set to false
, or if the buttons used to close the message box are not covered under the OPT_CLOSE_CONFIRM_BUTTONS option, the call will fail and raise a CloseFailedException.
closeConfirm
- specifies whether to close confirmation dialogs that may pop up when closing the window, for example a 'Save changes' dialog. Use true
to close confirmation dialogs and false
to raise an exception if a confirmation dialog pops up. If set to true
the value of the option OPT_CLOSE_CONFIRM_BUTTONS is used to determine which button to select in order to close confirmation dialogs.List<IMoveable> getCloseWindows()
TestObject getFocus()
IMoveable getNextCloseWindow()
boolean isActive()
void maximize()
void minimize()
void move(Point pos)
pos
- the window coordinatesvoid restore()
void setActive()
void size(int width, int height)
width
- the new width of the window, in pixelsheight
- the new height of the window, in pixelsint getWindowState()
Copyright 2009-2012 Micro Focus. All Rights Reserved.