public class WindowFunctions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLICK_KEYWORD
"Click"
|
static java.lang.String |
CLOSEWINDOW_KEYWORD
"CloseWindow"
|
static java.lang.String |
COMPARESTOREDPROPERTIES_KEYWORD
"CompareStoredProperties"
|
static java.lang.String |
DOUBLECLICK_KEYWORD
"DoubleClick"
|
static java.lang.String |
GETWININFO_KEYWORD
"GetWinInfo"
|
static java.lang.String |
GOBACK_KEYWORD
"GoBack"
|
static java.lang.String |
INPUTCHARACTERS_KEYWORD
"InputCharacters"
|
static java.lang.String |
INPUTKEYS_KEYWORD
"InputKeys"
|
static java.lang.String |
MAXIMIZE_KEYWORD
"Maximize"
|
static java.lang.String |
MINIMIZE_KEYWORD
"Minimize"
|
static java.lang.String |
PINCHCLOSE_KEYWORD
"PinchClose"
|
static java.lang.String |
PINCHOPEN_KEYWORD
"PinchOpen"
|
static java.lang.String |
RESTORE_KEYWORD
"Restore"
|
static java.lang.String |
RIGHTCLICK_KEYWORD
"RightClick"
|
static java.lang.String |
SELECTMENUID_KEYWORD
"SelectMenuID"
|
static java.lang.String |
SELECTMENUITEM_KEYWORD
"SelectMenuItem"
|
static java.lang.String |
SELECTMENUITEMCONTAINS_KEYWORD
"SelectMenuItemContains"
|
static java.lang.String |
SETFOCUS_KEYWORD
"SetFocus"
|
static java.lang.String |
SETPOSITION_KEYWORD
"SetPosition"
|
static java.lang.String |
VERIFYIMAGE_KEYWORD
"VerifyImage"
|
static java.lang.String |
VERIFYMAINMENU_KEYWORD
"VerifyMainMenu"
|
static java.lang.String |
VERIFYMENUID_KEYWORD
"VerifyMenuID"
|
static java.lang.String |
VERIFYMENUITEM_KEYWORD
"VerifyMenuItem"
|
static java.lang.String |
VERIFYMENUITEMCONTAINS_KEYWORD
"VerifyMenuItemContains"
|
static java.lang.String |
VERIFYOCRVALUE_KEYWORD
"VerifyOCRValue"
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentFunction |
click(java.lang.String winname,
java.lang.String compname,
java.lang.String appMapSubkey)
Performs a click on any part of a Window based on a stored x,y coordinate.
|
static ComponentFunction |
closeWindow(java.lang.String winname,
java.lang.String compname)
Sends a Close command to the active window.
|
static ComponentFunction |
compareStoredProperties(java.lang.String winname,
java.lang.String compname,
java.lang.String vPAsset)
Performs a WindowVP CompareProperties on an object.
|
static ComponentFunction |
doubleClick(java.lang.String winname,
java.lang.String compname,
java.lang.String appMapSubkey)
Performs a double-click on any part of a Window based on a stored x,y coordinate.
|
static WindowFunctions |
getInstance()
public Singleton to access class static methods via instance
|
static ComponentFunction |
getWinInfo(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Gets the value of any property in a window.
|
static ComponentFunction |
getWinInfo(java.lang.String winname,
java.lang.String compname,
java.lang.String propertyName,
java.lang.String variableName)
Gets the value of any property in a window.
|
static ComponentFunction |
goBack(java.lang.String winname,
java.lang.String compname)
Make the application\device "go back" to the previous state or window.
|
static ComponentFunction |
inputCharacters(java.lang.String winname,
java.lang.String compname,
java.lang.String textValue)
Sends literal text to the active window via an InputChars command.
|
static ComponentFunction |
inputKeys(java.lang.String winname,
java.lang.String compname,
java.lang.String textValue)
Sends keystrokes to the active window via an InputKeys command.
|
static ComponentFunction |
maximize(java.lang.String winname,
java.lang.String compname)
Sends a WMaximize command to the active window.
|
static ComponentFunction |
minimize(java.lang.String winname,
java.lang.String compname)
Sends a WMinimize command to the active window.
|
static ComponentFunction |
pinchClose(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
|
static ComponentFunction |
pinchClose(java.lang.String winname,
java.lang.String compname,
java.lang.String originSubKey,
java.lang.String resizeSubKey,
java.lang.String duration)
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
|
static ComponentFunction |
pinchOpen(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
|
static ComponentFunction |
pinchOpen(java.lang.String winname,
java.lang.String compname,
java.lang.String originSubKey,
java.lang.String resizeSubKey,
java.lang.String duration)
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
|
static ComponentFunction |
restore(java.lang.String winname,
java.lang.String compname)
Sends a RestorePos command to the active window.
|
static ComponentFunction |
rightClick(java.lang.String winname,
java.lang.String compname,
java.lang.String appMapSubkey)
Performs a right-click on any part of a Window based on a stored x,y coordinate.
|
static ComponentFunction |
selectMenuID(java.lang.String winname,
java.lang.String compname,
java.lang.String menuID)
Attempts to select a particular menuitem by menuID.
|
static ComponentFunction |
selectMenuItem(java.lang.String winname,
java.lang.String compname,
java.lang.String textValue)
Attempts to select a particular text string menuitem.
|
static ComponentFunction |
selectMenuItemContains(java.lang.String winname,
java.lang.String compname,
java.lang.String textValue)
Attempts to select a menuitem based on a partial text match.
|
static ComponentFunction |
setFocus(java.lang.String winname,
java.lang.String compname)
Set focus on the window.
|
static ComponentFunction |
setPosition(java.lang.String winname,
java.lang.String compname,
java.lang.String presetReference)
Sends a SetPosition command to the window to set the position, size, and status of the window.
|
static ComponentFunction |
verifyImage(java.lang.String winname,
java.lang.String compname,
java.lang.String vPAsset)
Performs a WindowVP CompareImage OR a RegionImageVP on an object.
|
static ComponentFunction |
verifyMainMenu(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Compares the active windows menu system with a benchmark
Retrieves the active windows menu system and outputs the full structure
with status to a file.
|
static ComponentFunction |
verifyMainMenu(java.lang.String winname,
java.lang.String compname,
java.lang.String benchmarkFile,
java.lang.String descriptiveText,
java.lang.String testFile,
java.lang.String diffFile)
Compares the active windows menu system with a benchmark
Retrieves the active windows menu system and outputs the full structure
with status to a file.
|
static ComponentFunction |
verifyMenuID(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Attempts to verify the state information of a particular menuitem
identified by MenuID.
|
static ComponentFunction |
verifyMenuID(java.lang.String winname,
java.lang.String compname,
java.lang.String menuID,
java.lang.String expectedStatus)
Attempts to verify the state information of a particular menuitem
identified by MenuID.
|
static ComponentFunction |
verifyMenuItem(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Attempts to verify the state information of a particular text string menuitem.
|
static ComponentFunction |
verifyMenuItem(java.lang.String winname,
java.lang.String compname,
java.lang.String menuItemText,
java.lang.String expectedStatus)
Attempts to verify the state information of a particular text string menuitem.
|
static ComponentFunction |
verifyMenuItemContains(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Attempts to verify the state information of a menuitem found by partial text match.
|
static ComponentFunction |
verifyMenuItemContains(java.lang.String winname,
java.lang.String compname,
java.lang.String menuItemText,
java.lang.String expectedStatus)
Attempts to verify the state information of a menuitem found by partial text match.
|
static ComponentFunction |
verifyOCRValue(java.lang.String winname,
java.lang.String compname,
java.lang.String[] parameters)
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
|
static ComponentFunction |
verifyOCRValue(java.lang.String winname,
java.lang.String compname,
java.lang.String vPAsset,
java.lang.String oCRIntegerValue,
java.lang.String expectedTextValue)
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
|
public static final java.lang.String CLICK_KEYWORD
public static final java.lang.String CLOSEWINDOW_KEYWORD
public static final java.lang.String COMPARESTOREDPROPERTIES_KEYWORD
public static final java.lang.String DOUBLECLICK_KEYWORD
public static final java.lang.String GETWININFO_KEYWORD
public static final java.lang.String GOBACK_KEYWORD
public static final java.lang.String INPUTCHARACTERS_KEYWORD
public static final java.lang.String INPUTKEYS_KEYWORD
public static final java.lang.String MAXIMIZE_KEYWORD
public static final java.lang.String MINIMIZE_KEYWORD
public static final java.lang.String PINCHCLOSE_KEYWORD
public static final java.lang.String PINCHOPEN_KEYWORD
public static final java.lang.String RESTORE_KEYWORD
public static final java.lang.String RIGHTCLICK_KEYWORD
public static final java.lang.String SELECTMENUID_KEYWORD
public static final java.lang.String SELECTMENUITEM_KEYWORD
public static final java.lang.String SELECTMENUITEMCONTAINS_KEYWORD
public static final java.lang.String SETFOCUS_KEYWORD
public static final java.lang.String SETPOSITION_KEYWORD
public static final java.lang.String VERIFYIMAGE_KEYWORD
public static final java.lang.String VERIFYMAINMENU_KEYWORD
public static final java.lang.String VERIFYMENUID_KEYWORD
public static final java.lang.String VERIFYMENUITEM_KEYWORD
public static final java.lang.String VERIFYMENUITEMCONTAINS_KEYWORD
public static final java.lang.String VERIFYOCRVALUE_KEYWORD
public static WindowFunctions getInstance()
public static ComponentFunction click(java.lang.String winname, java.lang.String compname, java.lang.String appMapSubkey)
Performs a click on any part of a Window based on a stored x,y coordinate.
For components that are unrecognized, like ActiveToolbar menuitems,
we can click on these or any part of a Window based on a stored x,y
coordinate. The window containing the coordinate is first given
context and then a click is generated at the coordinate. Thus, an item
or object can be referenced by name even though it is only recognized
via coordinates.
The coordinate lookup is done with the component name of the record AND
Field #5.
Typical Data Table records:
(1) t MainWindow MainWindow Click AnObject
(2) t MainWindow FileMenu Click Exit
#1 above will contain an AnObject="3,10" entry in the MainWindow section
of the Application Map to click at x=3, y=10 in the MainWindow.
#2 above will contain a FileMenu entry in the MainWindow section with
normal recognition information for it (the type, however, should still
be "Window" even if unspecified). FileMenu will also have it's
own section in the Application Map in which there will be an entry like
Exit="15,30". This will tell Robot to locate the FileMenu Window
object and click at the coordinates specified by the reference.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.appMapSubkey - Optional:NO
Name of the AppMap subkey to lookup and use for the click.public static ComponentFunction closeWindow(java.lang.String winname, java.lang.String compname)
Sends a Close command to the active window.
This Window command has a problem in that it does not want to
use the same recognition methods used by the other Window commands (like
SetContext). Particularly, it does not accept the Type=Window portion
of these recognition methods. In addition, if the window is a child
window of a parent then it expects the ";ChildWindow" add-on in the
recognition method. The child may also need the parent as part of its
full recognition string like:
ChildWindow=Type=Window;;\;Caption=;ChildWindow
To handle these child windows, we parse the typical recognition method for
our window and attempt to handle these issues. Once SetContext has
successfully set our window, we then remove any "Type=Window" substring
if present and add the ";ChildWindow" substring if not present.
To take advantage of this, this routine must be called with the child
window as a component of the parent window like below:
t, ParentWindow, ChildWindow, CloseWindow
If the routine is called like either of the examples below then default
processing will occur. This will merely SetContext on the provided
Window and use "CurrentWindow" as the parameter to the command.
t, ParentWindow, ParentWindow, CloseWindow
t, ChildWindow , ChildWindow , CloseWindow (normally won't work)
Closes the "current" or "lastUsed" WebDriver associated with the found Window component.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction compareStoredProperties(java.lang.String winname, java.lang.String compname, java.lang.String vPAsset)
Performs a WindowVP CompareProperties on an object.
Performs a WindowVP CompareProperties on an object.
The benchmark VP must already exist and be an asset of the currently
running script.
To make an existing VP an asset of the current script,
the existing script, e.g.,
MADHATTERScript.MyObjectVP.base.OBP
can be copied and renamed to
MyDDScript.MyObjectVP.base.OBP
where MyDDScript is the name of the current script.
The name of the actual VP, MyObjectVP, cannot be altered.
Example 1: Perform a WindowVP on a given window
t, MainWindow, MainWindow, CompareStoredProperties, MainSetupVP1
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.vPAsset - Optional:NO
Name of the pre-existing VP asset stored in the currently running script.public static ComponentFunction doubleClick(java.lang.String winname, java.lang.String compname, java.lang.String appMapSubkey)
Performs a double-click on any part of a Window based on a stored x,y coordinate.
For components that are unrecognized, like ActiveToolbar menuitems,
we can double click on these or any part of a Window based on a stored
x,y coordinate. The window containing the coordinate is first given
context and then a double click is generated at the coordinate. Thus,
an item or object can be referenced by name even though it is only
recognized via coordinates.
The coordinate lookup is done with the component name of the record AND
Field #5.
Typical Data Table records:
(1) t MainWindow MainWindow DoubleClick AnObject
(2) t MainWindow FolderTree DoubleClick Node1
#1 above will contain an AnObject="3,10" entry in the MainWindow section
of the Application Map to double click at x=3, y=10 in the MainWindow.
#2 above will contain a FolderTree entry in the MainWindow section with
normal recognition information for it . FolderTree will also have it's
own section in the Application Map in which there will be an entry like
Node1="15,30". This will tell Robot to locate the FolderTree
object and double click at the coordinates specified by the reference.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.appMapSubkey - Optional:NO
Name of the AppMap subkey to lookup and use for the double-click.public static ComponentFunction getWinInfo(java.lang.String winname, java.lang.String compname, java.lang.String propertyName, java.lang.String variableName)
Gets the value of any property in a window.
Gets the value of any property in a window and assigns that property
to a variable for later use.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.propertyName - Optional:NO
The name of the property to retrieve.variableName - Optional:NO
The name of the variable that the property value should be stored in.public static ComponentFunction getWinInfo(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Gets the value of any property in a window.
Gets the value of any property in a window and assigns that property
to a variable for later use.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction goBack(java.lang.String winname, java.lang.String compname)
Make the application\device "go back" to the previous state or window.
This is largely for apps or devices--like mobile devices--that have the ability to
"go back" that might be activated by a control that is NOT always part of
the application GUI. Example: a hardware "back" button or menu button that is not
part of the application itself.
Depending upon the technology implementation, The WINDOWNAME may not have to be
valid or exist at the time of invocation. That is, the WINDOWNAME and COMPNAME
fields might not be used and can contain anything.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction inputCharacters(java.lang.String winname, java.lang.String compname, java.lang.String textValue)
Sends literal text to the active window via an InputChars command.
Sends literal text to the active window via an InputChars command.
The InputChars command does not convert or interpret any special
characters like InputKeys (InputKeystrokes) does.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.textValue - Optional:NO
String of keystrokes to send.public static ComponentFunction inputKeys(java.lang.String winname, java.lang.String compname, java.lang.String textValue)
Sends keystrokes to the active window via an InputKeys command.
Sends keystrokes to the active window via an InputKeys command.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.textValue - Optional:NO
String of keystrokes to send.public static ComponentFunction maximize(java.lang.String winname, java.lang.String compname)
Sends a WMaximize command to the active window.
Sends a WMaximize command to the active window.
This Window command has a problem in that it does not want to
use the same recognition methods used by the other Window commands (like
SetContext). Particularly, it does not accept the Type=Window portion
of these recognition methods. In addition, if the window is a child
window of a parent then it expects the ";ChildWindow" add-on in the
recognition method. The child may also need the parent as part of its
full recognition string like:
ChildWindow=Type=Window;;\;Caption=;ChildWindow
To handle these child windows, we parse the typical recognition method for
our window and attempt to handle these issues. Once SetContext has
successfully set our window, we then remove any "Type=Window" substring
if present and add the ";ChildWindow" substring if not present.
To take advantage of this, this routine must be called with the child
window as a component of the parent window like below:
t, ParentWindow, ChildWindow, Maximize
If the routine is called like either of the examples below then default
processing will occur. This will merely SetContext on the provided
Window and use "CurrentWindow" as the parameter to the command.
t, ParentWindow, ParentWindow, Maximize
t, ChildWindow , ChildWindow , Maximize (normally won't work)
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction minimize(java.lang.String winname, java.lang.String compname)
Sends a WMinimize command to the active window.
Sends a WMinimize command to the active window.
This Window command has a problem in that it does not want to
use the same recognition methods used by the other Window commands (like
SetContext). Particularly, it does not accept the Type=Window portion
of these recognition methods. In addition, if the window is a child
window of a parent then it expects the ";ChildWindow" add-on in the
recognition method. The child may also need the parent as part of its
full recognition string like:
ChildWindow=Type=Window;;\;Caption=;ChildWindow
To handle these child windows, we parse the typical recognition method for
our window and attempt to handle these issues. Once SetContext has
successfully set our window, we then remove any "Type=Window" substring
if present and add the ";ChildWindow" substring if not present.
To take advantage of this, this routine must be called with the child
window as a component of the parent window like below:
t, ParentWindow, ChildWindow, Minimize
If the routine is called like either of the examples below then default
processing will occur. This will merely SetContext on the provided
Window and use "CurrentWindow" as the parameter to the command.
t, ParentWindow, ParentWindow, Minimize
t, ChildWindow , ChildWindow , Minimize (normally won't work)
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction pinchClose(java.lang.String winname, java.lang.String compname, java.lang.String originSubKey, java.lang.String resizeSubKey, java.lang.String duration)
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
Effectively shrinks a user-defined rectangular area on the screen.
IOS expects the Window/Component to be the main active Window of the application.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.originSubKey - Optional:NO
The AppMapSubkey that contains the onscreen rectangle for the pinch operation.resizeSubKey - Optional:NO
Name of the AppMap subkey to lookup for the resize value or the literal text of
the resize values.duration - Optional:YES DefaultVal:1The number of seconds to take for the operation.public static ComponentFunction pinchClose(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
Perform a shrinking "zoom out" operation on a touchscreen device supporting the feature.
Effectively shrinks a user-defined rectangular area on the screen.
IOS expects the Window/Component to be the main active Window of the application.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction pinchOpen(java.lang.String winname, java.lang.String compname, java.lang.String originSubKey, java.lang.String resizeSubKey, java.lang.String duration)
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
Effectively expands or stretches a user-defined rectangular area on the screen.
IOS expects the Window/Component to be the main active Window of the application.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.originSubKey - Optional:NO
The AppMapSubkey that contains the onscreen rectangle for the pinch operation.resizeSubKey - Optional:NO
Name of the AppMap subkey to lookup for the resize value or the literal text of
the resize values.duration - Optional:YES DefaultVal:1The number of seconds to take for the operation.public static ComponentFunction pinchOpen(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
Perform an expanding "zoom in" operation on a touchscreen device supporting the feature.
Effectively expands or stretches a user-defined rectangular area on the screen.
IOS expects the Window/Component to be the main active Window of the application.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction restore(java.lang.String winname, java.lang.String compname)
Sends a RestorePos command to the active window.
Sends a RestorePos command to the active window.
This Window command has a problem in that it does not want to
use the same recognition methods used by the other Window commands (like
SetContext). Particularly, it does not accept the Type=Window portion
of these recognition methods. In addition, if the window is a child
window of a parent then it expects the ";ChildWindow" add-on in the
recognition method. The child may also need the parent as part of its
full recognition string like:
ChildWindow=Type=Window;;\;Caption=;ChildWindow
To handle these child windows, we parse the typical recognition method for
our window and attempt to handle these issues. Once SetContext has
successfully set our window, we then remove any "Type=Window" substring
if present and add the ";ChildWindow" substring if not present.
To take advantage of this, this routine must be called with the child
window as a component of the parent window like below:
t, ParentWindow, ChildWindow, Restore
If the routine is called like either of the examples below then default
processing will occur. This will merely SetContext on the provided
Window and use "CurrentWindow" as the parameter to the command.
t, ParentWindow, ParentWindow, Restore
t, ChildWindow , ChildWindow , Restore (normally won't work)
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction rightClick(java.lang.String winname, java.lang.String compname, java.lang.String appMapSubkey)
Performs a right-click on any part of a Window based on a stored x,y coordinate.
For components that are unrecognized, like ActiveToolbar menuitems,
we can right click on these or any part of a Window based on a stored x,y
coordinate. The window containing the coordinate is first given
context and then a right click is generated at the coordinate. Thus, an item
or object can be referenced by name even though it is only recognized
via coordinates.
The coordinate lookup is done with the component name of the record AND
Field #5.
Typical Data Table records:
(1) t MainWindow MainWindow RightClick AnObject
(2) t MainWindow ToolItem RightClick PrintTool
#1 above will contain an AnObject="3,10" entry in the MainWindow section
of the Application Map to right click at x=3, y=10 in the MainWindow.
#2 above will contain a ToolItem entry in the MainWindow section with
normal recognition information for it . ToolItem will also have it's
own section in the Application Map in which there will be an entry like
PrintTool="15,30". This will tell Robot to locate the PrintTool Window
object and right click at the coordinates specified by the reference.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.appMapSubkey - Optional:NO
Name of the AppMap subkey to lookup and use for the right-click.public static ComponentFunction selectMenuID(java.lang.String winname, java.lang.String compname, java.lang.String menuID)
Attempts to select a particular menuitem by menuID.
Attempts to select a particular menuitem by menuID. This is generally
used when the menuitem is a bitmap or other item that does not have
text. This value can be retrieved from the the menu by index or by
manual lookup from a menu structure output from MenuUtilities.
The routine first verifies that the specified menuitem exists and exits
with error if it does not. If it does exist then the selection proceeds.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.menuID - Optional:NO
MenuID to identify which menuitem to select.public static ComponentFunction selectMenuItem(java.lang.String winname, java.lang.String compname, java.lang.String textValue)
Attempts to select a particular text string menuitem.
Attempts to select a particular text string menuitem. The menuitem
should be specified in the form "Menu->Menu->MenuItem CTRL+V"
with the full text, spaces(if any), and keyboard shortcut text (if
any).
Ampersands preceding underlined characters are optional.
The routine first verifies that the specified menuitem exists
and exits with error if it does not.
If it does exist then the selection proceeds using the MenuID retrieved
from the found menuitem.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.textValue - Optional:NO
Menu->MenuItem hierarchy string to identify which menuitem to select.public static ComponentFunction selectMenuItemContains(java.lang.String winname, java.lang.String compname, java.lang.String textValue)
Attempts to select a menuitem based on a partial text match.
Attempts to select a menuitem based on a partial text match.
The menuitem should be specified in the form "Menu->Menu->MenuItem".
Each level in the hierarchy can be represented by partial text.
Ampersands preceding underlined characters are optional.
The routine first verifies that the specified menuitem exists
and exits with error if it does not.
If it does exist then the selection proceeds using the MenuID retrieved
from the found menuitem.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.textValue - Optional:NO
Menu->MenuItem hierarchy string to identify which menuitem to select.public static ComponentFunction setFocus(java.lang.String winname, java.lang.String compname)
Set focus on the window.
Set focus and bring the window forward.
Bring the window forward. If there are same name/caption/title windows then the first
window will come forward. The window is find by title.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.public static ComponentFunction setPosition(java.lang.String winname, java.lang.String compname, java.lang.String presetReference)
Sends a SetPosition command to the window to set the position, size, and status of the window.
Sends a SetPosition command to the window to set the position, size,
and status of the window. The position, size, and status information
is stored in the app map as a subitem in the section for the window.
The information should be in the format of:
"0,0,640,480;Status=NORMAL" OR
"Coords=0,0,640,480;Status=NORMAL"
That example positions the window at 0,0; sizes it to 640 x 480, and
sets it's status to NORMAL. Valid values for STATUS are:
NORMAL, MINIMIZED, and MAXIMIZED
The Window SetPosition command has a problem in that it does not want to
use the same recognition methods used by the other Window commands (like
SetContext). Particularly, it does not accept the Type=Window portion
of these recognition methods. In addition, if the window is a child
window of a parent then it expects the ";ChildWindow" add-on in the
recognition method. The child may also need the parent as part of its
full recognition string like:
ChildWindow=Type=Window;;\;Caption=;ChildWindow
To handle these child windows, we parse the typical recognition method for
our window and attempt to handle these issues. Once SetContext has
successfully set our window, we then remove any "Type=Window" substring
if present and add the ";ChildWindow" substring if not present.
To take advantage of this, this routine must be called with the child
window as a component of the parent window like below:
t, ParentWindow, ChildWindow, SetPosition, ChildPositionReference
If the routine is called like either of the examples below then default
processing will occur. This will merely SetContext on the provided
Window and use "CurrentWindow" as the parameter to SetPosition.
t, ParentWindow, ParentWindow, SetPosition, ParentPosition
t, ChildWindow , ChildWindow , SetPosition, ChildPosition (normally won't work)
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.presetReference - Optional:NO
String specifying a preset reference in the Application for the position, size, and state of the Window.public static ComponentFunction verifyImage(java.lang.String winname, java.lang.String compname, java.lang.String vPAsset)
Performs a WindowVP CompareImage OR a RegionImageVP on an object.
Performs a WindowVP CompareImage OR a RegionImageVP on an object.
The benchmark VP must already exist and be an asset of the currently
running script.
A RegionImageVP can be accomplished by having the name of the VP as an item
under the component in the application map. The item's value must be
the coordinate values required by the RegionImageVP (i.e. "65,100,200,250").
Example 1: Perform a WindowVP CompareImage
MainWindow SomeWindowObject VerifyImage StoredVP
(no StoredVP item found in the app map under SomeWindowObject)
The named VP (StoredVP) must not exist in the application map. The
entire panel/object of SomeWindowObject will be captured and compared
against the StoredVP baseline which must already exist as an asset of the
currently running script.
Example 2: Perform a RegionImageVP on a particular area of the screen
MainWindow SomeWindowObject VerifyImage StoredVP
(StoredVP found as:
"65,100,200,250" OR
"Coords=65,100,200,250"
in the SomeWindowObject section of the app map)
The named VP (StoredVP) is found to exist in the application map as a
subitem in the SomeWindowObject section of the map. This causes
the routine to attempt a RegionImageVP using the map's value of the StoredVP
item as the coordinates for the region to capture. StoredVP is ALSO the
name of the VP which must already exist as an asset of the currently
running script.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.vPAsset - Optional:NO
TextValue is the name of the pre-existing VP asset stored in the currently running script.public static ComponentFunction verifyMainMenu(java.lang.String winname, java.lang.String compname, java.lang.String benchmarkFile, java.lang.String descriptiveText, java.lang.String testFile, java.lang.String diffFile)
Compares the active windows menu system with a benchmark
Retrieves the active windows menu system and outputs the full structure
with status to a file. It then compares that file with the specified
benchmark file and sets pass/fail conditions for the test.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.benchmarkFile - Optional:NO
name.ext of benchmark file on repositiory's Datapool\Bench directorydescriptiveText - Optional:YES
Optional expected descriptive text at start of file (first line of bench).testFile - Optional:YES
optional name.ext to give current structure in repository's
Datapool\Test directory for compare with benchmark.diffFile - Optional:YES
Optional name.ext to store difference informationpublic static ComponentFunction verifyMainMenu(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Compares the active windows menu system with a benchmark
Retrieves the active windows menu system and outputs the full structure
with status to a file. It then compares that file with the specified
benchmark file and sets pass/fail conditions for the test.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyMenuID(java.lang.String winname, java.lang.String compname, java.lang.String menuID, java.lang.String expectedStatus)
Attempts to verify the state information of a particular menuitem
identified by MenuID.
Attempts to verify the state information of a particular menuitem
identified by MenuID. This is generally used when the menuitem is a
bitmap or other item that does not have text.
This value can be retrieved from the the menu by index or by manual
lookup from a menu structure output from MenuUtilities.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.menuID - Optional:NO
MenuID to identify which menuitem to test.expectedStatus - Optional:NO
Expected status string (or part thereof) to verify.public static ComponentFunction verifyMenuID(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Attempts to verify the state information of a particular menuitem
identified by MenuID.
Attempts to verify the state information of a particular menuitem
identified by MenuID. This is generally used when the menuitem is a
bitmap or other item that does not have text.
This value can be retrieved from the the menu by index or by manual
lookup from a menu structure output from MenuUtilities.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyMenuItem(java.lang.String winname, java.lang.String compname, java.lang.String menuItemText, java.lang.String expectedStatus)
Attempts to verify the state information of a particular text string menuitem.
Attempts to verify the state information of a particular text string
menuitem. The menuitem should be specified in the form
"Menu->Menu->MenuItem CTRL+V" with the full text (ampersands optional),
spaces(if any), and keyboard shortcut text (if any).
(The ampersands precede any character in the menuitem that is underlined.)
Note 1: This command differs from JavaMenuFunctions.VerifyMenuItemContains as this
command seeks a Window object that contains a Window's menu.
Note 2: For RobotJ engine, this command only supports JavaSwing. It may support other clients in the future.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.menuItemText - Optional:NO
Menu->MenuItem hierarchy string to identify which menuitem to test.expectedStatus - Optional:NO
Expected status string (or part thereof) to verify.public static ComponentFunction verifyMenuItem(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Attempts to verify the state information of a particular text string menuitem.
Attempts to verify the state information of a particular text string
menuitem. The menuitem should be specified in the form
"Menu->Menu->MenuItem CTRL+V" with the full text (ampersands optional),
spaces(if any), and keyboard shortcut text (if any).
(The ampersands precede any character in the menuitem that is underlined.)
Note 1: This command differs from JavaMenuFunctions.VerifyMenuItemContains as this
command seeks a Window object that contains a Window's menu.
Note 2: For RobotJ engine, this command only supports JavaSwing. It may support other clients in the future.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyMenuItemContains(java.lang.String winname, java.lang.String compname, java.lang.String menuItemText, java.lang.String expectedStatus)
Attempts to verify the state information of a menuitem found by partial text match.
Attempts to verify the state information of a menuitem found by partial text match.
The menuitem should be specified in the form "Menu->Menu->MenuItem".
(Optional ampersands precede any character in the menuitem that is underlined.)
Note 1: This command differs from JavaMenuFunctions.VerifyMenuItemContains as this
command seeks a Window object that contains a Window's menu.
Note 2: For RobotJ engine, this command only supports JavaSwing. It may support other clients in the future.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.menuItemText - Optional:NO
Menu->MenuItem hierarchy string to identify which menuitem to test.expectedStatus - Optional:NO
Expected status string (or part thereof) to verify.public static ComponentFunction verifyMenuItemContains(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Attempts to verify the state information of a menuitem found by partial text match.
Attempts to verify the state information of a menuitem found by partial text match.
The menuitem should be specified in the form "Menu->Menu->MenuItem".
(Optional ampersands precede any character in the menuitem that is underlined.)
Note 1: This command differs from JavaMenuFunctions.VerifyMenuItemContains as this
command seeks a Window object that contains a Window's menu.
Note 2: For RobotJ engine, this command only supports JavaSwing. It may support other clients in the future.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
public static ComponentFunction verifyOCRValue(java.lang.String winname, java.lang.String compname, java.lang.String vPAsset, java.lang.String oCRIntegerValue, java.lang.String expectedTextValue)
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
The benchmark VP must already exist and be an asset of the currently
running script.
A RegionImageVP can be accomplished by having the name of the VP as an item
under the component in the application map. The item's value must be
the coordinate values required by the RegionImageVP
(i.e. "Coords=65,100,200,250").
EXAMPLE 1 : Perform a WindowVP CompareImage before OCR Test
t, MainWindow, SomeWindowObject, VerifyOCRValue, StoredVP, 1, "Expected Text"
(no StoredVP item found in the app map under SomeWindowObject)
The named VP (StoredVP) must not exist in the application map if you
intend to compare the entire window. The entire panel/object of
SomeWindowObject will be captured and compared against the StoredVP
baseline. This VP must already exist as an asset of the
currently running script.
EXAMPLE 2 : Perform a RegionImageVP before the OCR test
t, MainWindow, SomeWindowObject, VerifyOCRValue, StoredVP, DataField, "Expected Text"
StoredVP found in Application Map like below:
[SomeWindowObject]
SomeWindowObject="Type=Something...."
StoredVP="Coords=65,100,200,250" --- invokes a RegionImageVP
....
When the named VP (StoredVP) is found to exist in the application map as a
subitem in the SomeWindowObject section of the map then a RegionImageVP
will be invoked using the value of the StoredVP item as the coordinates
for the region to capture.
StoredVP is ALSO the name of the VP which must already exist as an asset
of the currently running script.
Once the unlogged VP has been completed, we attempt to retrieve the text
of a predefined OCR region mask that should exist in the VP.
We can use the OCRRegion value provided from the inputrecord to identify
the OCR mask number as needed by the SQAGetOcrRegionText function in Robot.
Example 1 above shows we are looking for OCR region #1.
The OCRRegion value in the inputrecord can also be a reference in the
Application Map in a section with the same name as the VP as shown below.
[SomeWindowObject]
SomeWindowObject="Type=Something...."
StoredVP="Coords=65,100,200,250"
....
[StoredVP]
DataField=1
AnotherField=2
....
Example 2 above shows that we have given region #1 a name of DataField.
Once retrieved, the OCR text (if any) is compared against the expected
results provided.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.vPAsset - Optional:NO
VPTextValue is the name of the pre-existing VP asset stored in the currently running script.oCRIntegerValue - Optional:NO
IntegerValue is the numeric OCR region mask to get the text from.expectedTextValue - Optional:NO
Text baseline to compare against the retrieved OCR text.public static ComponentFunction verifyOCRValue(java.lang.String winname, java.lang.String compname, java.lang.String[] parameters)
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
Performs an UNLOGGED WindowVP CompareImage OR a RegionImageVP on an
object then attempts to retrieve and compare OCR text to the expected
value provided.
The benchmark VP must already exist and be an asset of the currently
running script.
A RegionImageVP can be accomplished by having the name of the VP as an item
under the component in the application map. The item's value must be
the coordinate values required by the RegionImageVP
(i.e. "Coords=65,100,200,250").
EXAMPLE 1 : Perform a WindowVP CompareImage before OCR Test
t, MainWindow, SomeWindowObject, VerifyOCRValue, StoredVP, 1, "Expected Text"
(no StoredVP item found in the app map under SomeWindowObject)
The named VP (StoredVP) must not exist in the application map if you
intend to compare the entire window. The entire panel/object of
SomeWindowObject will be captured and compared against the StoredVP
baseline. This VP must already exist as an asset of the
currently running script.
EXAMPLE 2 : Perform a RegionImageVP before the OCR test
t, MainWindow, SomeWindowObject, VerifyOCRValue, StoredVP, DataField, "Expected Text"
StoredVP found in Application Map like below:
[SomeWindowObject]
SomeWindowObject="Type=Something...."
StoredVP="Coords=65,100,200,250" --- invokes a RegionImageVP
....
When the named VP (StoredVP) is found to exist in the application map as a
subitem in the SomeWindowObject section of the map then a RegionImageVP
will be invoked using the value of the StoredVP item as the coordinates
for the region to capture.
StoredVP is ALSO the name of the VP which must already exist as an asset
of the currently running script.
Once the unlogged VP has been completed, we attempt to retrieve the text
of a predefined OCR region mask that should exist in the VP.
We can use the OCRRegion value provided from the inputrecord to identify
the OCR mask number as needed by the SQAGetOcrRegionText function in Robot.
Example 1 above shows we are looking for OCR region #1.
The OCRRegion value in the inputrecord can also be a reference in the
Application Map in a section with the same name as the VP as shown below.
[SomeWindowObject]
SomeWindowObject="Type=Something...."
StoredVP="Coords=65,100,200,250"
....
[StoredVP]
DataField=1
AnotherField=2
....
Example 2 above shows that we have given region #1 a name of DataField.
Once retrieved, the OCR text (if any) is compared against the expected
results provided.
Supporting Engines:
winname - Optional:NO
The name of the window to act upon.compname - Optional:NO
The name of the component to act upon.parameters - Optional:NO
An array containing the following parameters:
Copyright © SAS Institute. All Rights Reserved.