Selenium GenericMasterFunctions::AssignPropertyVariable
Assign the string value of an object property to a specific DDVariable
Assign the string value of an object property to a specific DDVariable.
Note, if you supply the name of the variable and include the leading
caret (^) symbol then the variable must be enclosed in quotes.
Otherwise, that variable will be used like any other variable and the
substituted value of that variable will be interpretted as the name
of the variable you wish to use.
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object property.
-
VariableName
The name of the variable to receive the property value.
The name of the variable to receive the property value.
Note, if you supply the name of the variable and include the leading
caret (^) symbol then the variable must be enclosed in quotes.
Otherwise, that variable will be used like any other variable and the
substituted value of that variable will be interpretted as the name
of the variable you wish to use.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line property values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the recovered value of the property when logging its success. This is generally
useful when retrieving property values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, WindowID, WindowID, AssignPropertyVariable, Visible, AVariableName
Assign the value of the "Visible" property of WindowID to DDVariable ^AVariableName.
-
T, WindowID, WindowID, AssignPropertyVariable, Visible, AVariableName, SUPPRESSVALUE
Assign the value of the "Visible" property of WindowID to DDVariable ^AVariableName.
When logging the success (or failure) of the command the actual value of the property
should NOT be included in the messages.
-
T, WindowID, WindowID, AssignPropertyVariable, Visible, "AVariableName"
Assign the value of the "Visible" property of WindowID to DDVariable ^AVariableName.
-
T, WindowID, WindowID, AssignPropertyVariable, Visible, "^AVariableName"
Assign the value of the "Visible" property of WindowID to DDVariable ^AVariableName.
-
C, SetVariableValues, ^AVariableName="NextVariableName"
T, WindowID, WindowID, AssignPropertyVariable, Visible, ^AVariableName
Assign the value of the "Visible" property of WindowID to DDVariable ^NextVariableName.
[How To Read This Reference]
Selenium GenericMasterFunctions::CaptureObjectDataToFile
Copy the current contents of an object's data to a file.
Only an object that Robot can perform an ObjectData VP
on can use this command. By default, the files will be
stored in the active "Test" directory. If you specify a
relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
Fields: [ ]=
Optional with Default Value
-
File
The name of the file used to store the object data.
The name of the file used to store the object data.
By default, the files will be
stored in the active "Test" directory. If you specify a
relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
- [ FileEncoding = ]
Specify a character encoding to be used when saving data to a file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
- [ FilterMode = ]
(Future) Specify a file filter to use to process the text before comparison.
- [ FilterOptions = ]
(Future) Specify filter options to use with the file filter.
Examples:
-
T, Browser, HTMLTable, CaptureObjectDataToFile, aFilename.ext, , "", ""
Capture the HTMLTable object data contents to a file.
Capture the HTMLTable object data contents to the
Datapool\Test\aFilename.ext file.
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Browser, HTMLTable, CaptureObjectDataToFile, myDirectory\aFilename.ext, , "", ""
Capture the HTMLTable object data contents to a file.
Capture the HTMLTable object data contents to the
[project]\myDirectory\aFilename.ext file.
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Browser, HTMLTable, CaptureObjectDataToFile, tableContent.ext
Capture the HTMLTable object data contents to a file.
Capture the HTMLTable object data contents,
save it to file tableContent.ext by the system default file encoding.
-
T, Browser, HTMLTable, CaptureObjectDataToFile, tableContent.ext, "UTF-8"
Capture the HTMLTable object data contents to a file.
Capture the HTMLTable object data contents,
save it to file tableContent.ext by UTF-8 encoding.
[How To Read This Reference]
Selenium GenericMasterFunctions::CapturePropertiesToFile
Copy all of the value properties a test object to a file.
Copy all of the value properties a test object to a file.
By default, the files will be
stored in the active "Test" directory. If you specify a
relative path, the path will be relative to the project
directory. The directory for a full or relative path must already exist.
Fields: [ ]=
Optional with Default Value
-
File
The name of the file used to store the property list data.
The name of the file used to store the property list data.
By default, the files will be
stored in the active "Test" directory. If you specify a
relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
- [ FileEncoding = ]
Specify a character encoding to be used when saving data to a file.
Specify a character encoding to be used when saving data to a file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
This parameter was added to this command in Nov 2011 as implemented for
the Apple IOS engine and may not yet be supported in all engines otherwise
supporting this command.
Examples:
-
T, Window, Comp, CapturePropertiesToFile, aFilename.ext
Capture the Comp properties to a file with comma as the delimiter.
Capture the Comp properties to a file with comma as the delimiter.
-
T, Window, Comp, CapturePropertiesToFile, aFilename.properties, "UTF-8"
Capture the Comp properties to a file with comma as the delimiter.
Capture the Comp properties to a file with comma as the delimiter.
[How To Read This Reference]
Selenium GenericMasterFunctions::CapturePropertyToFile
Copy a propertie's value of a test object to to a file.
Copy a propertie's value of a test object to to a file.
The file will be stored in the active "Test" directory.
If you specify a relative path, the path will be relative
to the project directory. The directory for a full or
relative path must already exist.
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object array property to verify.
-
File
The name of the file used to store the property list data.
The name of the file used to store the property list data.
By default, the files will be
stored in the active "Test" directory. If you specify a
relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
- [ FileEncoding = ]
Specify a character encoding to be used when saving data to a file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
Examples:
-
T, Window, Comp, CapturePropertyToFile, propertyName, aFilename.ext
Capture the value of Comp's property described by propertyName to a file.
Capture the value of Comp's property described by propertyName to a file.
-
T, Window, Comp, CapturePropertyToFile, propertyName, aFilename.ext
Capture the value of Comp's property described by propertyName to a file.
Capture the value of Comp's property described by propertyName,
save it to file aFilename.ext by the system default file encoding.
-
T, Window, Comp, CapturePropertyToFile, propertyName, aFilename.ext, "UTF-8"
Capture the value of Comp's property described by propertyName to a file.
Capture the value of Comp's property described by propertyName,
save it to file aFilename.ext by UTF-8 encoding.
[How To Read This Reference]
Selenium GenericMasterFunctions::ClearAppMapCache
Clear the internal application map cache.
Some Engines maintain an internal cache of previously sought
application objects. In RobotJ, there exists a cache of
TestObject objects, that cache is cleared by this command
so that the recognition string algorithm has to be re-run
the next time a window or component is to be recognized.
This is useful for cases when a dialog pops up, goes
away, then pops up again. The cached version of the
dialog or it's components may not correspond to the actual
version. This command lets a tester clear the cache when
this kind of condition may arrise.
(Future: instruct the safsmaps service
to reload it's application map data)
Selenium GenericMasterFunctions::ClearCache
Clear the cache of a component.
Clear the cache of a component. To save time, component may contain a cache to store its content
or some time-consuming resource. But sometime, the cache's content may not be fresh, which will
affect the test, at this situation, user may call this keyword to clear the cache and SAFS will
use the latest content.
NOTE:
SE2 : Supported For Selenium WebDriver.
Selenium GenericMasterFunctions::ExecuteScript
Execute a piece of script on the specified component synchronously.
Execute a piece of script on the specified component synchronously.
NOTE:
SE2HTM : Execute a piece of javascript on the specified component synchronously.
Fields: [ ]=
Optional with Default Value
-
script
The script to execute.
The script to execute.
- [ paramN = ]
The paramters passed to script.
The paramters passed to script. You can specify more than one parameter or no parameter.
If the script will return a value, you can get it from variable "__$_SAFS_JAVASCRIPT_RESULT_$__".
Now, only the string result is supported.
NOTE:
SE2HTM :
The parameters specified here will feed the script's parameters from the 2th place.
The script's first parameter will be always the component itself.
Examples:
-
T, WINDOW, COMPONENT, ExecuteScript, "arguments[0].innerHTML=arguments[1];", "The text to shown on page"
This action will set the 'innerHTML' of COMPONENT to "The text to shown on page".
arguments[0] is the first parameter of script, it will be repalced by COMPONENT at runtime.
arguments[1] is the 2th parameter of script, it will be repalced by "The text to shown on page" at runtime.
[How To Read This Reference]
Selenium GenericMasterFunctions::GetComputedStyle
Get a component's 'computed style', and save them to a file.
Get a component's 'computed style', and save them to a file.
NOTE:
SE2HTM : 'Computed Style' is typically a derived property of the HTML domain.
Fields: [ ]=
Optional with Default Value
-
TestFile
The test file to save 'computed style'.
The test file to save 'computed style'.
The full absolute path to the test file or a relative path.
Relative path's should be sought in this order:
- The Project's Test directory;
- Relative to the Project's Datapool directory;
- Relative to the Project's root directory;
NOTE:
SE2HTM : The test file is in JSON format.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::GetGUIImage
Capture the screen shot of a GUI component and save it to a file
Capture the screen shot of a GUI component and save it to a file.
The available formats for the output file are BITMAP (*.bmp) and JPEG
(*.jpg).
For RJ and IBT engine, other formats like TIFF (*.tif), GIF (*.gif),
PNG (*.png) and PNM (*.pnm) are also supported.
Optionally the user can specify part of the component to capture.
The specified GUI component/part must be in the viewing range of its
containing window. If portion of the component is displayed in the
window, only that portion will be captured; if the component falls
completely out of the viewing range of the window, the command will
fail. The command makes no attempt to bring the component into view.
Robot Classic (RC) Specific Notes:
1) This command may fail to execute if the user has turned off logging
to TestManager via the Robot tools setting. You may have to enable
TestManager logging for the command to successfully execute.
2) This command requires that the TestManager Image Comparator tool is
installed on the test machine. Machines having only the Robot Test Agent
installed will not be able to use this command.
3) Due to a bug in Robot Classic, images captured using the Robot Classic
engine may differ in image size and/or file size from those captured using
other supported engines. Depending on the comparator used, rebenching
your images may be necessary when migrating to another engine.
RobotJ (RJ) and IBT Specific Notes:
1)It requires that Java Advanced Imaging (JAI) be installed
on the test machine
2)It supports to save image in format TIFF (*.tif), GIF (*.gif), PNG (*.png)
and PNM (*.pnm)
Apple IOS specific Notes:
UIAutomation captures all screenshots as PNG images, but SAFS copies and stores them
into the image format desired (JPG, BMP, etc.). However, the rootname of the desired
output image name must be unique to avoid UIAutomation generating indexed image names
we will not be looking for.
For example, specifying MyImage.JPG and later MyImage.BMP will cause UIAutomation to capture
MyImage.PNG and MyImage1.PNG. When attempting to find MyImage.PNG captured for MyImage.BMP
we will retrieve MyImage.PNG which is NOT the correct image capture for MyImage.BMP.
Fields: [ ]=
Optional with Default Value
-
OutputFile
Path (with filename) to the output image file.
Path/file name of the output image file.
This can be a full path, a relative path or just a file name. If
relative, it is appended to the Datapool directory; if only a
file name without path, the file will be saved in Datapool\Test
directory. The extension of the file must be either .bmp or
.jpg. If not, .bmp is appended to this parameter to force a
BITMAP export.
- [ SubArea = ]
Optional app map subkey indicating partial image of the component to capture.
Optional app map subkey indicating partial image of the component to capture.
Value of this app map reference must be in the format of a
top-left and bottom-right pair, and can be either absolute
coordinates or percentages ("x1,y1,x2,y2" or "x1%,y1%,x2%,y2%").
Coordinates are relative to the component, i.e. (0,0) and
(0%,0%) are the minimum, and (COMPONENT_WIDTH, COMPONENT_HEIGHT)
and (100%,100%) are the maximum. Values exceeding the minimun/
maximum are forced to the nearest limiting value. Absolute and
percent values can be mixed, so "0,0,50%,50%" is valid. If this
parameter is omitted, full image of the component is captured
(equivalent to "0,0,100%,100%").
- [ FilteredAreas = ]
"Filter=one or multiple areas" to filter the GUI image (or sub image of GUI if the parameter "SubArea" is present)
"Filter=one or multiple areas" to filter the GUI image (or sub image of GUI if the parameter "SubArea" is present)
The area is in the same format described for the parameter "SubArea".
Multiple areas are separated by a space character, such as "subarea1 subarea2 subarea3"
The filtered-image will be covered by black color at filtered areas.
Do NOT forget the prefix "Filter=", without it this parameter will be ignored.
Examples:
-
T, WINDOW, COMPONENT, GetGUIImage, "C:\comp.bmp"
Save the full component image to BITMAP file "C:\comp.bmp".
-
T, WINDOW, COMPONENT, GetGUIImage, "Datapool\comp.jpg"
Save the full component image to JPEG file "<project>\Datapool\comp.jpg".
-
T, WINDOW, COMPONENT, GetGUIImage, "Datapool\Logs\comp.bmp", SUBAREA
Save specified part of the component image.
Save specified part of the component image.
Depending on the definition of SUBAREA in the app map, the command captures:
UNDER [COMPONENT] IN APP MAP PART OF COMPONENT
---------------------------- ---------------------
SUBAREA="0,0,10,10" top-left 10x10 square
SUBAREA="0,80%,100%,100%" bottom fifth
-
T, WINDOW, COMPONENT, GetGUIImage, "Datapool\comp.jpg", "", "Filter=0;0;10;10"
Get the component image and filter some parts and save it.
Get the full component image and draw a "10*10 black quare" at the top-left,
then save it to JPEG file "<project>\Datapool\comp.jpg".
-
T, WINDOW, COMPONENT, GetGUIImage, "comp.jpg", "", "FilterMapKey"
Get the component image and filter some parts and save it.
Get the full component image, and draw "10x10 black square" at "top-left" and "10x15 black rectangle" at "60,60"
to make a filtered image, and save the filtered image.
---------------------------- Map ---------------------
[COMPONENT]
FilterMapKey="Filter=0,0,10,10 60,60,10,15"
[How To Read This Reference]
Selenium GenericMasterFunctions::GetTextFromGUI
Incorporate OCR technology to detect the text on a GUI component and save the text to a variable.
Two open-source OCRs are integrated into SAFS. One is TesseractOCR (TOCR) at
http://code.google.com/p/tesseract-ocr; the other GOCR at http://jocr.sourceforge.net.
TOCR 2.0.4 and GOCR 0.48 are the latest release. They are available in SAFS and only
support English. Both two OCR owners claim to support more languages in next release. Chinese,
Japanese, and Korean are going to be supported in TOCR's next release 3.00.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive detected text.
The name of the variable to receive detected text. Note, if you supply the name of the variable
and include the leading caret (^) symbol then the variable must be enclosed in quotes. Otherwise,
that variable will be used like any other variable and the substituted value of that variable will
be interpreted as the name of the variable you wish to use.
- [ SubArea = ]
Optional app map subkey indicating partial image of the component to capture.
Optional app map subkey indicating partial image of the component to capture. Value of this app
map reference must be in the format of a top-left and bottom-right pair, and can be either absolute
coordinates or percentages ("x1,y1,x2,y2" or "x1%,y1%,x2%,y2%"). Coordinates are relative to the
component, i.e. (0,0) and (0%,0%) are the minimum, and (COMPONENT_WIDTH, COMPONENT_HEIGHT) and
(100%,100%) are the maximum. Values exceeding the minimun/ maximum are forced to the nearest
limiting value. Absolute and percent values can be mixed, so "0,0,50%,50%" is valid.
If this parameter is omitted with blank or empty string, full image of the component is captured
(equivalent to "0,0,100%,100%").
- [ OCRId = ]
OCRId indicating the OCR used to recognize text.
Two OCR engines are supported. "TOCR" will be taken as default if the parameter is blank.
"TOCR" stands for Tesseract OCR; "GOCR" stands for GOCR.
Note: Seems TOCR performs a bit better than GOCR (personal experience).
- [ LangId = ]
Optional LangId representing the language in use for selected OCR to recognize text.
For both TOCR and GOCR, only English is supported so far. Language Id takes standard language code,
which can be gotten by calling Locale.ENGLISH.getLanguage().
LangId Language
"en" --- English
"cn" --- Chinese
If LangId is not specified with blank or empty string, the language of System locale will be
used as default.
- [ ScaleRatio = ]
Optional ScaleRatio indicating the scale ratio for resizing the original image.
To fit in font size and DPI required by OCR, SAFS needs to resize images before sending them
to OCR engines. For screen-captured images with 96DPI, TOCR takes 1.9 as default; GOCR takes 1.5
as default. You may try different ScaleRatio to find an appropriate value if default setting is
unable to meet your requirement.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::GUIDoesExist
Routine to verify the visual existence of a particular window and/or component.
Routine to verify the visual existence of a particular window and/or component.
If the window(Field 2) and component(Field 3) are the same then we only
check for the existence of the window. However, if the component is
actually a child of the window then we first check for the window and
then check for the component.
If a Window or Component is HIDDEN, it will be treated as if it Does NOT Exist.
The item must be VISIBLE to pass.
Selenium GenericMasterFunctions::GUIDoesNotExist
Routine to verify the visual non-existence of a particular window and/or component.
Routine to verify the visual non-existence of a particular window and/or component.
If the window(Field 2) and component(Field 3) are the same then we only
check for the visual non-existence of the window. However, if the component is
actually a child of the window then we first check for the visual existence of the
window and then check for the visual non-existence of the component.
If a Window or Component is HIDDEN, it will be treated as if it Does NOT Exist.
The item must not exist or be HIDDEN to pass.
Selenium GenericMasterFunctions::HoverMouse
Hover the mouse over an object.
By default, hover on the center of the component for 2000 milliseconds.
We can also hover on any part of an object based on a stored x,y
coordinate. The object containing the coordinate is first given
context and then the hover command 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 Component HoverMouse 1000
(2) t MainWindow MainWindow HoverMouse AnObject 2000
(3) t MainWindow FolderTree HoverMouse Node1 3000
#1 above will contain a blank as it's 5th field and 1000 as 6th field,
and it will hover at the center of the Component for 1000 milliseconds.
#2 above will contain an AnObject="3,10" entry in the MainWindow section
of the Application Map to hover at x=3, y=10 in the MainWindow.
#3 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 Generic
object and hover at the coordinates specified by the reference.
NOTE:
RC :
This command requires a version of Rational Robot that includes MousePause support (released
and patched in Robot v2003). Though not required, you may also choose to enable this
functionality for Robot Recording (Tools->GUI Record Options...->General Tab).
NOTE:
TC :
The optional parameter HoverTime doesn't take effect, so don't supply it.
NOTE:
SE :
The optional parameter AppMapSubkey doesn't take effect, always hover at the center.
Fields: [ ]=
Optional with Default Value
- [ AppMapSubkey = ]
(Optional)Name of the AppMap subkey to lookup and use for the hover.
Without this we should hover on the center of the object.
Name of the AppMap subkey to lookup and use for the hover.
We expect the AppMap to contain the item in the format "x,y":
[Component]
Node1="33,120" OR
Node1="Coords=33,120" OR
Node1="Icon" (or whatever is appropriate)
The results from the lookup are appended to the "Coords=" string
used by the hover command in Robot (if necessary). So any
valid content used with the hover command can be part of
this AppMap entry.
Both Fields #3 and #5 are used to locate the item in the App Map.
This routine does not specify an App Map so only the current Map
is used and it is expected to be valid.
- [ HoverTime = 2000 ]
(Optional)Number of milliseconds to hover.
Examples:
-
T, WINDOW, WINDOW, HoverMouse
Hover the mouse over the center of WINDOW for 2000 milliseconds.
Hover the mouse over the center of WINDOW for 2000 milliseconds.
-
T, WINDOW, WINDOW, HoverMouse, , -1
Hover the mouse over the center of WINDOW forever.
Hover the mouse over the center of WINDOW forever.
-
T, WINDOW, AnObject, HoverMouse, "Coords=200,400"
Hover the mouse over coordinates 200,400 of AnObject for 2000 milliseconds.
Hover the mouse over coordinates 200,400 of AnObject for 2000 milliseconds.
-
T, WINDOW, AnObject, HoverMouse, ASubObject, 1000
Hover the mouse over an x,y coordinate indicated by the ASubObject reference in
the Application Map for 1000 milliseconds.
Field 5 : TQ String. A reference identified in the Application Map identifying coordinates
on which to hover.
This example shows AnObject as a viable object in the WINDOW but that it also has its own
section in the Application Map which contains one or more named references like
ASubObject which are used for test.
-
T, WINDOW, AnObject, HoverMouse, , 3000
Hover the mouse over the center of AnObject for 3000 milliseconds.
Hover the mouse over the center of AnObject for 3000 milliseconds.
[How To Read This Reference]
Selenium GenericMasterFunctions::HoverScreenLocation
Hover the mouse over a specified screen location.
Hover the mouse over a specified screen location.
We can hover on any screen location based on stored x,y
coordinates or hardcoded literal values. The Window:Component fields
can be anything at all and will be ignored if they do not exist in the app map,
or if the retrieved app map data does not contain coordinate data.
Thus, an item or object can be referenced by name even though it is only
known via coordinates.
If the Window:Component AppMap lookup does NOT contain coordinate data and is ignored, then
the AppMapSubKey field is REQUIRED and is expected to contain a reference or literal
text containing absolute screen coordinates.
If the Window:Component AppMap lookup DOES contain coordinate data, this data is treated as
the absolute screen coordinates to be used. The AppMapSubKey field becomes OPTIONAL and
coordinate data in the field is treated as a relative offset added to the absolute values
found for the Window:Component.
Any AppMapSubKey lookup is done with the Component name in the record AND
Field #5.
Typical Data Table records:
(1) t MainWindow Component HoverScreenLocation 1000
(2) t MainWindow MainWindow HoverScreenLocation AnObject 2000
(3) t MainWindow MainWindow HoverScreenLocation 50,80 3000
(4) t AnyWin AnyComp HoverScreenLocation Node1 3000
#1 above will contain a blank as it's 5th field and 1000 as 6th field. Because the AppMapSubKey
field is blank, the [MainWindow] section of the AppMap MUST have a Component item with valid
absolute screen coordinate data. The mouse cursor will hover at the specified Component location
for 1000 milliseconds.
#2 above will contain an AnObject="Coords=50,80" entry in the [MainWindow] section
of the AppMap. If there is a MainWindow component in the AppMap with valid screen coordinates
then the mouse cursor will hover with a relative offset of 50,80 from those absolute screen
coordinates. Otherwise, the mouse will hover at absolute screen coordinates 50,80.
#3 If there is a MainWindow component in the [MainWindow] section of the AppMap with valid screen
coordinates then the mouse cursor will hover with a relative offset of 50,80 from those absolute
screen coordinates. Otherwise, the mouse will hover at absolute screen coordinates 50,80.
#4 above will contain no valid AnyWin:AnyComp coordinate data and
those fields will be ignored. However, Node1 MUST exist in the
Application Map [AnyComp] section to provide absolute screen coordinates.
Fields: [ ]=
Optional with Default Value
- [ AppMapSubkey = ]
(Sometimes Optional)Name of the AppMap subkey to lookup and use for the hover.
Without this there MUST be absolute screen coordinates stored in the AppMap
for the Window:Component specified.
Name of the AppMap subkey to lookup and use for the hover.
We expect the AppMap to contain the coordinates in the following supported formats:
[Component]
Node1="33,120" (comma-delimited) OR
Node1="33;120" (semi-colon delimited) OR
Node1="33 120" (space-delimited) OR
Node1="Coords=33,120" (comma-delimited) OR
Node1="Coords=33;120" (semi-colon delimited) OR
Node1="Coords=33 120" (space-delimited)
Both Fields #3 and #5 are used to locate the item in the App Map.
This routine does not specify an App Map so only the current Map
is used and it is expected to be valid.
This field can instead contain the literal text of any absolute or relative coordinates
in the same formats as shown above.
- [ HoverTime = 2000 ]
(Optional)Number of milliseconds to hover.
If not specified, the mouse will hover at the specified coordinates for 2000 milliseconds.
Examples:
-
T, WINDOW, WINDOW, HoverScreenLocation
Hover the mouse at specified WINDOW coordinates for 2000 milliseconds.
Hover the mouse at screen coordinates specified for the Window item stored in the
[Window] section of the current AppMap.
-
T, WINDOW, AnObject, HoverScreenLocation, "Coords=200,400"
Hover the mouse at coordinates 200,400 for 2000 milliseconds.
Hover the mouse at coordinates 200,400 for 2000 milliseconds. This assumes AnObject
is NOT an item in the [Window] section of the current AppMap with valid coordinate data.
-
T, WINDOW, AnObject, HoverScreenLocation, ASubObject, 1000
Hover the mouse using x,y screen coordinates stored in the ASubObject reference in the
[AnObject] section of the current AppMap for 1000 milliseconds.
ASubObject reference found in the AppMap [AnObject] section stores screen coordinates
on which to hover.
-
T, WINDOW, AnObject, HoverScreenLocation, , 3000
Hover the mouse over the Window:AnObject screen coordinates for 3000 milliseconds.
Because no AppMapSubKey is provided the AnObject item MUST exist in the [WINDOW] section
of the current AppMap and it MUST contain valid screen coordinate data.
[How To Read This Reference]
Selenium GenericMasterFunctions::InputCharacters
Sends literal text to the specified component.
Sends literal text to the specified component.
The InputChars command does not convert or interpret any special
characters like InputKeys (InputKeystrokes) does.
Some engines cannot set keyboard focus to the component.
These engines will require the component already have keyboard focus before
calling this command.
Fields: [ ]=
Optional with Default Value
-
TextValue
String of keystrokes to send.
String of keystrokes to send.
For RRAFS(RC): consult the documentation on the SQA InputChars command This
routine sends the provided string unmodified to the InputChars
command.
Examples:
-
T, WINDOW, WINDOW, INPUTCHARACTERS, "Some Text to Input"
This action sends "Some Text to Input" as keystrokes to the COMPONENT object.
Field 5 : TQ String. Case-sensitive text to send to the specified component.
The text will be sent as literal text, unmodified by the command
Note: Only valid for components that accept windows keyboard input
[How To Read This Reference]
Selenium GenericMasterFunctions::InputKeys
Sends keystrokes to the specified component.
Sends keystrokes to the specified component.
Some engines cannot set keyboard focus to the component.
These engines will require the component already have keyboard focus before
calling this command.
Fields: [ ]=
Optional with Default Value
-
TextValue
String of keystrokes to send.
String of keystrokes to send.
For RRAFS (RC): consult the documentation on the SQA InputKeys command for
syntax information for special characters and keys. This
routine sends the provided string unmodified to the InputKeys
command.
Note: the TID supports this command using
InputKeys Support.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::IsPropertyExist
Verify if object's property exists or not.
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object property to verify.
-
PropertyExistVariable
The variable to store 'true' or 'false' to indicate if the property exist or not.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::LocateScreenImage
Store the location and dimensions of a component.
Store the location and dimensions of a component.
The component can be SAFS IBT, RJ, Selenium object.
The information is stored in a collection of variables using the variable root name provided.
The following variables are set by this command:
rootname=x y w h [space delimited values]
rootname.x=x
rootname.y=y
rootname.w=w
rootname.h=h
NOTE:
TID :
Currently in IBT, all coordinates are relative to the screen and not to any
parent window location or other client area.
Fields: [ ]=
Optional with Default Value
-
VariableName
The root name of the collection of variables to receive the location and dimensions.
- [ WhomRelativeTo = screen ]
This parameter decides the coordinates stored in VariableName is relative to the screen or the parent window.
'screen' means they are relative to the screen; 'parent' means they are relative to the parent window.
The parameter is curently available in RJ only.
Examples:
-
T, WindowID, WindowID, LocateScreenImage, AVariableName
Stores the following variable values:
AVariableName=x y w h [space delimited values]
AVariableName.x=x
AVariableName.y=y
AVariableName.w=w
AVariableName.h=h
-
C, SetVariableValues, ^AVariableName="NextVariableName"
T, WindowID, WindowID, LocateScreenImage, ^AVariableName
Stores the following variable values:
NextVariableName=x y w h [space delimited values]
NextVariableName.x=x
NextVariableName.y=y
NextVariableName.w=w
NextVariableName.h=h
-
T, ParentWindow, Component, LocateScreenImage, AVariableName, parent
AVariableName stores the coordinates that are relative to the left-top point of the ParentWindow:
AVariableName=x y w h [space delimited values]
AVariableName.x=x
AVariableName.y=y
AVariableName.w=w
AVariableName.h=h
[How To Read This Reference]
Selenium GenericMasterFunctions::SaveTextFromGUI
Incorporate OCR technology to detect the text on a GUI component and save the text to a text file.
Two open-source OCRs are integrated into SAFS. One is TesseractOCR (TOCR) at
http://code.google.com/p/tesseract-ocr; the other GOCR at http://jocr.sourceforge.net.
TOCR 2.0.4 and GOCR 0.48 are the latest release. They are available in SAFS and only
support English. Both two OCR owners claim to support more languages in next release. Chinese,
Japanese, and Korean are going to be supported in TOCR's next release 3.00.
Fields: [ ]=
Optional with Default Value
-
OutputFile
The name of the text file used to store detected text.
The name of the text file used to store detected text. By default, the files will be stored in
the active "Test" directory. If you specify a relative path, the path will be relative to the
project directory. The directory for a full or relative path must already exist.
- [ SubArea = ]
Optional app map subkey indicating partial image of the component to capture.
Optional app map subkey indicating partial image of the component to capture. Value of this app
map reference must be in the format of a top-left and bottom-right pair, and can be either absolute
coordinates or percentages ("x1,y1,x2,y2" or "x1%,y1%,x2%,y2%"). Coordinates are relative to the
component, i.e. (0,0) and (0%,0%) are the minimum, and (COMPONENT_WIDTH, COMPONENT_HEIGHT) and
(100%,100%) are the maximum. Values exceeding the minimun/ maximum are forced to the nearest
limiting value. Absolute and percent values can be mixed, so "0,0,50%,50%" is valid.
If this parameter is omitted with blank or empty string, full image of the component is captured
(equivalent to "0,0,100%,100%").
- [ OCRId = ]
OCRId indicating the OCR used to recognize text.
Two OCR engines are supported. "TOCR" will be taken as default if the parameter is blank.
"TOCR" stands for Tesseract OCR; "GOCR" stands for GOCR.
Note: Seems TOCR performs a bit better than GOCR (personal experience).
- [ LangId = ]
Optional LangId representing the language in use for selected OCR to recognize text.
For both TOCR and GOCR, only English is supported so far. Language Id takes standard language code,
which can be gotten by calling Locale.ENGLISH.getLanguage().
LangId Language
"en" --- English
"cn" --- Chinese
If LangId is not specified with blank or empty string, the language of System locale will be
used as default.
- [ ScaleRatio = ]
Optional ScaleRatio indicating the scale ratio for resizing the original image.
To fit in font size and DPI required by OCR, SAFS needs to resize images before sending them
to OCR engines. For screen-captured images with 96DPI, TOCR takes 1.9 as default; GOCR takes 1.5
as default. You may try different ScaleRatio to find an appropriate value if default setting is
unable to meet your requirement.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::ShowOnPage
Make the component visible on the page.
Make the component visible on the page.
Fields: [ ]=
Optional with Default Value
- [ verify = False ]
"True" to verify that the component is shown on page.
This parameter is boolean, default value is false.
Verify that the component is shown on page if this parameter is true.
Examples:
-
T, Window, Comp
Show the component Comp on the page, make it visible.
-
T, Window, Comp, True
Show the component Comp on the page, make it visible. And verify that this
component is shown.
[How To Read This Reference]
Selenium GenericMasterFunctions::TypeChars
Sends literal text keystrokes to whatever has keyboard focus.
Sends literal text keystrokes to whatever has keyboard focus.
The TypeChars command does not convert or interpret any special
characters like InputKeys or TypeKeys do.
No attempt is made to locate any specific window or component.
Keystrokes are simply sent to the system.
Fields: [ ]=
Optional with Default Value
-
TextValue
String of keystrokes to send.
Examples:
-
T, Anything, At All, TYPECHARS, "Some Text to Input"
This action sends "Some Text to Input" as unmodified keystrokes to the system.
Field 5 : TQ String. Case-sensitive text to send.
The text will be sent as literal text, unmodified by the command.
[How To Read This Reference]
Selenium GenericMasterFunctions::TypeEncryption
Sends secret-text (such as password) to whatever has keyboard focus.
User needs to provide the path to the "encrypted text" and the path
to the "private key".
NOTE:
This keyword is only for secure machine in which the user/users responsible
for the safety and security of the private key are the only ones with
access to the machine. The private key should NEVER be stored in
a more public location where unauthorized users may gain access to it.
NOTE:
To generate public key and private key, use following command:
java org.safs.RSA -gen -out outputfile
the outputfile will contain both keys, user should store them separatly in 2
files, keep the private key secret!!!
NOTE:
To encrypt the plain-text, use following command:
java org.safs.RSA -encrypt -data data/file -key publickey/file -out outputfile
the outputfile will contain the encrypted text.
Fields: [ ]=
Optional with Default Value
-
EncryptedDataFile
The full path of the file where the "encrypted data" is stored.
-
PrivateKeyFile
The full path of the file where the "private key" is stored.
This file should be kept VERY SECRECT, only the authorized users can access it.
Examples:
-
T, Anything, At All, TypeEncryption, "C:\safs\passwords\application.pass", "D:\secretPath\private.key"
Decrypt the data stored in file "C:\safs\passwords\application.pass" and
input the decrypted-data as unmodified keystrokes to the system.
The text will be sent as literal text, unmodified by the command.
[How To Read This Reference]
Selenium GenericMasterFunctions::TypeKeys
Sends keystrokes to whatever has keyboard focus.
Sends keystrokes to whatever has keyboard focus.
No attempt is made to locate any specific window or component.
Keystrokes are simply sent to the system.
Selenium GenericMasterFunctions::VerifyBinaryFileToFile
Verify the current contents of a binary (image, PDF etc.) file with a benchmark file.
Verify the current contents of a binary (image, PDF etc.) file with a benchmark file.
Typically, benchmarks are stored in the Datapool\Bench directory.
Typically, files to test are stored in the Datapool\Test directory.
In that event, the filename.ext is needed for both files.
The Window and Component objects are not validated and have no role.
The Window and Component strings can be any text, but they cannot be blank.
If the files are image, a diff image will be created if there are considered different.
If the files are PDF, they will be converted to image files and then compared as image file. Each PDF page
will be converted to an image, so comparison of 2 PDF files might be comparison of 2 set of image files.
The command may produce a WARNING if a diff tool for which we
have no means to verify the results is configured for use.
Consequently, if these warnings are expected, the user can use the
"TW" test record type to avoid issuing these warnings.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
File used as the comparison benchmark.
File used as the comparison benchmark.
This can be a full path, a relative path, or a file name. If
it is a filename, it is expected to be in the project's
Datapool\Bench directory. If it is a relative path,
FindSQAFile is used to located the file.
-
ActualFile
File used as the comparison file under test.
File used as the comparison file under test.
This can be a full path, a relative path, or a file name. If
it is a relative path or a file name, the command will try to
find the file in the project's Datapool\Test directory.
- [ FilterMode = ]
Specify a filter to use to process the file content before comparison.
Specify a filter to use to process the file content before comparison.
"TOLERANCE", valid if the 2 binary files are images, this represents BitTolerance.
- [ FilterOptions = ]
Specify filter options to use with the filter.
Specify filter options to use with the filter.
If the filter is "TOLERANCE", this value should be an integer between 0 and 100.
100 means only 100% match, 2 images will be considered matched;
0 means even no bits match, 2 images will be considered matched.
- [ AlterImageStyle = ]
It is used to alter the diff image when 2 image/PDF doesn't match.
It is used to alter the diff image when 2 image/PDF doesn't match.
It can be one of enum AlterImageStyle
- [ AlterImageFactor = ]
How much lighter or darker to alter the original pixel (with no difference), it is a double number between 0 and 1.
How much lighter or darker to alter the original pixel (with no difference), it is a double number between 0 and 1.
It only takes effect if the parameter 'alterImageStyle' is "TINT" or "SHADE".
For SHADE, the bigger the factor, the darker the shade.
For TINT, the bigger the factor, the lighter the tint.
- [ PdfResolution = ]
The resolution (DPI) used to convert PDF to image.
The resolution (DPI) used to convert PDF to image.
The default is 75.
Examples:
-
T, Browser, HTMLTable, VerifyBinaryFileToFile, bFilename.ext, aFilename.ext, "", ""
Verify a test binary file with the benchmark file.
Verify the test binary file with the benchmark file.
The benchmark file is located within the Project at Datapool\Bench\bFilename.ext
The test file is located within the Project at Datapool\Test\aFilename.ext
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Anything, AtAll, VerifyBinaryFileToFile, c:\Dir\bFilename.ext, c:\Dir\aFilename.ext
Verify a test text file with the benchmark file.
Verify the test text file with the benchmark file.
The benchmark file is not located within the Project. It is at c:\Dir\bFilename.ext
The test file is not located within the Project. It is at c:\Dir\aFilename.ext
-
T, Anything, AtAll, VerifyBinaryFileToFile, c:\Dir\bFilename.png, c:\Dir\aFilename.png, "Tolerance", "90"
Verify a test image file with the benchmark image file, with bit-tolerance as 90%.
Verify a test image file with the benchmark image file, with bit-tolerance as 90%.
If the 2 image files have 90% bits matched, then the verification will succeed.
-
T, Anything, AtAll, VerifyBinaryFileToFile, c:\Dir\bFilename.png, c:\Dir\aFilename.png, "Tolerance", "90", "SHADE", "0.9"
Verify a test image file with the benchmark image file, with bit-tolerance as 90%.
Verify a test image file with the benchmark image file, with bit-tolerance as 90%.
If the 2 image files have 90% bits matched, then the verification will succeed.
Otherwise, a diff image will be created, the pixels considered different will be highlighted in red.
the pixels considered same will be turned darker 90%, they are almost black.
-
T, Anything, AtAll, VerifyBinaryFileToFile, c:\Dir\bFilename.pdf, c:\Dir\aFilename.pdf, "Tolerance", "90", "TINT", "0.9", "100"
Verify a test PDF file with the benchmark PDF file, with bit-tolerance as 90%.
Verify a test PDF file with the benchmark PDF file, with bit-tolerance as 90%.
The PDF file will be converted to image files with resolution "100".
Then we compare the 2 set of image files one by one.
If the 2 image files have 90% bits matched, then the verification will succeed.
Otherwise, a diff image will be created, the pixels considered different will be highlighted in red.
the pixels considered same will be turned lighter 90%, they are almost white.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyComputedStyle
Verify a component's 'computed style' against a benchmark file.
Verify a component's 'computed style' against a benchmark file.
If the comparison fails, a copy of the captured 'computed style' should be stored in
the project's Test directory. This file, once verified, should be suitable to become a
new benchmark, if needed.
NOTE:
SE2HTM : 'Computed Style' is typically a derived property of the HTML domain.
Fields: [ ]=
Optional with Default Value
-
BenchFile
The benchmake file to compare against.
The benchmark file to compare against.
The full absolute path to the benchmark file or a relative path.
Relative path's should be sought in this order:
- The Project's Bench directory;
- Relative to the Project's Datapool directory;
- Relative to the Project's root directory;
NOTE:
SE2HTM : The benchmark file is expected to be in JSON format.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyFileToFile
Verify the current contents of a text file with a benchmark file (same as VerifyTextFileToFile).
Verify the current contents of a text file with a benchmark file (same as VerifyTextFileToFile).
Typically, benchmarks are stored in the Datapool\Bench directory.
Typically, files to test are stored in the Datapool\Test directory.
In that event, the filename.ext is needed for both files.
The Window and Component objects are not validated and have no role.
The Window and Component strings can be any text, but they cannot be blank.
The command may produce a WARNING if a diff tool for which we
have no means to verify the results is configured for use.
Consequently, if these warnings are expected, the user can use the
"TW" test record type to avoid issuing these warnings.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
File used as the comparison benchmark.
File used as the comparison benchmark.
This can be a full path, a relative path, or a file name. If
it is a filename, it is expected to be in the project's
Datapool\Bench directory. If it is a relative path,
FindSQAFile is used to located the file.
-
ActualFile
File used as the comparison file under test.
File used as the comparison file under test.
This can be a full path, a relative path, or a file name. If
it is a relative path or a file name, the command will try to
find the file in the project's Datapool\Test directory.
- [ FilterMode = ]
(Future) Specify a file filter to use to process the text before comparison.
- [ FilterOptions = ]
(Future) Specify filter options to use with the file filter.
Examples:
-
T, Browser, HTMLTable, VerifyFileToFile, bFilename.ext, aFilename.ext, "", ""
Verify a test text file with the benchmark file (same as VerifyTextFileToFile).
Verify the test text file with the benchmark file (same as VerifyTextFileToFile).
The benchmark file is located within the Project at Datapool\Bench\bFilename.ext
The test file is located within the Project at Datapool\Test\aFilename.ext
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Anything, AtAll, VerifyFileToFile, c:\Dir\bFilename.ext, c:\Dir\aFilename.ext
Verify a test text file with the benchmark file (same as VerifyTextFileToFile).
Verify the test text file with the benchmark file (same as VerifyTextFileToFile).
The benchmark file is not located within the Project. It is at c:\Dir\bFilename.ext
The test file is not located within the Project. It is at c:\Dir\aFilename.ext
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyGUIImageToFile
Verify the screen shot of a GUI component with a benchmark image file
Verify the screen shot of a GUI component with a benchmark image file.
The benchmark file must reside in the <project>\Datapool\Bench folder.
Only BMP and JPG files can be used as the benchmark. If the extension
of the bench file is not BMP or JPG, it is considered a BMP file.
For RJ and IBT engine, other formats like TIFF (*.tif), GIF (*.gif),
PNG (*.png) and PNM (*.pnm) are also supported.
Optionally the user can specify part of the component to verify.
The specified GUI component/part must be in the viewing range of its
containing window. If portion of the component is displayed in the
window, only that portion will be captured; if the component falls
completely out of the viewing range of the window, the command will
fail. The command makes no attemp to bring the component into view.
NOTE: the command may fail to execute if the user has turned off logging
to TestManager via the Robot tools setting. You may have to enable TestManager
logging for the command to successfully execute.
The command may produce a WARNING if a diff tool for which we
have no means to verify the results is configured for use.
Consequently, if these warnings are expected, the user can use the
"TW" test record type to avoid issuing these warnings.
This command requires that TestManager Image Comparator tool is
installed on the machine. Machines having only the Robot Test Agent
installed will not be able to usee this command.
RobotJ (RJ) and IBT Specific Notes:
1)It requires that Java Advanced Imaging (JAI) be installed
on the test machine
2)It supports to save image in format TIFF (*.tif), GIF (*.gif), PNG (*.png)
and PNM (*.pnm)
Apple IOS specific Notes:
UIAutomation captures all screenshots as PNG images, but SAFS copies and stores them
into the image format desired (JPG, BMP, etc.). However, the rootname of the desired
output image name must be unique to avoid UIAutomation generating indexed image names
we will not be looking for.
For example, specifying MyImage.JPG and later MyImage.BMP will cause UIAutomation to capture
MyImage.PNG and MyImage1.PNG. When attempting to find MyImage.PNG captured for MyImage.BMP
we will retrieve MyImage.PNG which is NOT the correct image capture for MyImage.BMP.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
Name of the benchmark image file.
Name of the benchmark image file.
Relative paths suitable for FindSQAFile can be used. Normally,
the Benchmark file would reside in the Project's Datapool\Bench
directory. A test file with the same name would be created in
the Datapool\Test folder. The resulting dif file with .txt
extension would be saved under the Datapool\Dif folder. The
extension of the benchmark file should be .bmp or .jpg. If not,
it is considered a BMP file, i.e. the test file would have a
.bmp extension.
- [ SubArea = ]
Optional app map subkey indicating partial image of the component to verify.
Optional app map subkey indicating partial image of the component to verify.
Value of this app map reference must be in the format of a
top-left and bottom-right pair, and can be either absolute
coordinates or percentages ("x1,y1,x2,y2" or "x1%,y1%,x2%,y2%").
Coordinates are relative to the component, i.e. (0,0) and
(0%,0%) are the minimum, and (COMPONENT_WIDTH, COMPONENT_HEIGHT)
and (100%,100%) are the maximum. Values exceeding the minimun/
maximum are forced to the nearest limiting value. Absolute and
percent values can be mixed, so "0,0,50%,50%" is valid. If this
parameter is omitted, full image of the component is captured
(equivalent to "0,0,100%,100%").
- [ PercentageTolerance = ]
The percentage of bits need to be matched.
The percentage of bits need to be matched. it is between 0 and 100.
100 means only all bits of images match, the images will be considered matched.
0 means even no bits matche, the images will be considered matched.
- [ UUIDFlag = ]
"UUID=False" to make Test/Actuals Filenames the same as the Benchmark.
If "UUID=False" is present, and the Engine defaults to appending Universally Unique IDs to
the filenames stored as runtime Test/Actuals, then this setting will prevent the appending of those
UUIDs to the runtime Test/Actual filename. Essentially, the Test/Actual filename will generally be
given the same filename as the benchmark.
- [ FilteredAreas = ]
"Filter=one or multiple areas" to filter the GUI image (or sub image of GUI if the parameter "SubArea" is present)
and it will also be used to filter the bench image before comparing. If there are some differences, the diff image
will be made between these 2 filtered images (not the acutal and bench image).
"Filter=one or multiple areas" to filter the GUI image (or sub image of GUI if the parameter "SubArea" is present)
and it will also be used to filter the bench image before comparing. If there are some differences, the diff image
will be made between these 2 filtered images (not the acutal and bench image).
The area is in the same format described for the parameter "SubArea".
Multiple areas are separated by a space character, such as "subarea1 subarea2 subarea3"
The actual-image and bench-image will be covered by black color at filtered areas.
Do NOT forget the prefix "Filter=", without it this parameter will be ignored.
Examples:
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.bmp"
Verify the full component image with BITMAP file "<project>\Datapool\Bench\comp.bmp".
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.bmp", "", "", "UUID=False"
Verify the full component image with BITMAP file "<project>\Datapool\Bench\comp.bmp".
If the runtime GUIImage is to be saved to the Test/Actuals directory it should NOT have
a Universally Unique ID appended to the filename.
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.jpg"
Verify the full component image with JPEG file "<project>\Datapool\Bench\comp.jpg"
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.jpg", "", 95
Verify the full component image with JPEG file "<project>\Datapool\Bench\comp.jpg"
If 95% of bits match, then the verification will pass.
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.bmp", SUBAREA
Verify specified part of the component image with a bench file.
Verify specified part of the component image with a bench file
Depending on the definition of SUBAREA in the app map, the command verifies:
UNDER [COMPONENT] IN APP MAP PART OF COMPONENT
---------------------------- ---------------------
SUBAREA="0,0,10,10" top-left 10x10 square
SUBAREA="0,80%,100%,100%" bottom fifth
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.jpg", "", "", "", "Filter=0;0;10;10 60;60;10;15"
Filter specified parts of the component image and of a bench file, and verify 2-filtered images.
Get the full component image, and draw "10x10 black square" at "top-left" and "10x15 black rectangle" at "60,60"
to make a filtered image, then get the image of JPEG file "<project>\Datapool\Bench\comp.jpg"
and filter it the same way, finally compare these 2 filtered images.
-
T, WINDOW, COMPONENT, VerifyGUIImageToFile, "comp.jpg", "", "", "", "FilterMapKey"
Filter specified parts of the component image and of a bench file, and verify 2-filtered images.
Get the full component image, and draw "10x10 black square" at "top-left" and "10x15 black rectangle" at "60,60"
to make a filtered image, then get the image of JPEG file "<project>\Datapool\Bench\comp.jpg"
and filter it the same way, finally compare these 2 filtered images.
---------------------------- Map ---------------------
[COMPONENT]
FilterMapKey="Filter=0,0,10,10 60,60,10,15"
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyObjectDataToFile
Verify the current contents of an object's data with a benchmark file.
Typically, benchmarks are stored in the Datapool\Bench directory.
In that event, only the filename.ext is needed. Only an object that
Robot can perform an ObjectData VP on can use this command.
The command will produce a TEST WARNING if the user has configured an
alternate DIFF tool for which we have no means to compare the diff results.
If this WARNING is expected, the user should use the "TW" test record type.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
The name of the file used as the comparison benchmark.
The name of the file used as the comparison benchmark.
Typically, benchmarks are stored in the Datapool\Bench directory.
In that event, only the filename.ext is needed.
- [ FileEncoding = ]
Specify a character encoding to be used when opening a bench file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
- [ FilterMode = ]
(Future) Specify a file filter to use to process the text before comparison.
- [ FilterOptions = ]
(Future) Specify filter options to use with the file filter.
Examples:
-
T, Browser, HTMLTable, VerifyObjectDataToFile, aFilename.ext, , "", ""
Verify the HTMLTable object data contents with the benchmark file.
The benchmark file is located within the Project at Datapool\Bench\aFilename.ext
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Browser, HTMLTable, VerifyObjectDataToFile, aFilename.ext, "UTF-8"
Verify the HTMLTable object data contents with the benchmark file.
The benchmark file is located within the Project at Datapool\Bench\aFilename.ext
The benchmark file will be opened with "UTF-8" file-encoding.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyPropertiesSubsetToFile
Compare/Verify the subset of properties of a test object with the values stored in a benchmark file.
Compare/Verify the subset of properties of a test object with the values stored in a benchmark file.
Only the properties stored in the benchmark are compared against the properties of the test object.
The benchmark file is expected to be stored in the active "Bench" directory.
If you specify a relative path, the path will be relative to the project
directory. The directory for a full or relative path must already exist.
Fields: [ ]=
Optional with Default Value
-
BenchFile
The name of the file used to store the benchmark property data.
The name of the file used to store the benchmark property data.
By default, the files are expected in the active "Bench" directory.
If you specify a relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
- [ FileEncoding = ]
Specify a character encoding to be used when loading data from the file.
Specify a character encoding to be used when loading data from the file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
Examples:
-
T, Window, Comp, VerifyPropertiesSubsetToFile, aFilename.ext
Verify the Comp properties against the subset of properties in the benchmark file.
Verify the Comp properties against the subset of properties in the benchmark file.
-
T, Window, Comp, VerifyPropertiesSubsetToFile, aFilename.properties, "UTF-8"
Verify the Comp properties against the benchmark file read in as UTF-8 encoded.
Verify the Comp properties against the benchmark file read as UTF-8 encoded.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyPropertiesToFile
Compare/Verify ALL of the value properties of a test object with a benchmark file.
Compare/Verify all of the value properties of a test object with a benchmark file.
The benchmark file is expected to be stored in the active "Bench" directory.
If you specify a relative path, the path will be relative to the project
directory. The directory for a full or relative path must already exist.
Fields: [ ]=
Optional with Default Value
-
BenchFile
The name of the file used to store the benchmark property data.
The name of the file used to store the benchmark property data.
By default, the files are expected in the active "Bench" directory.
If you specify a relative path, the path will be relative to the project
directory. The directory for a full or relative path
must already exist.
- [ FileEncoding = ]
Specify a character encoding to be used when loading data from the file.
Specify a character encoding to be used when loading data from the file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
Examples:
-
T, Window, Comp, VerifyPropertiesToFile, aFilename.ext
Verify the Comp properties against the benchmark file.
Verify the Comp properties against the benchmark file.
-
T, Window, Comp, VerifyPropertiesToFile, aFilename.properties, "UTF-8"
Verify the Comp properties against the benchmark file read in as UTF-8 encoded.
Verify the Comp properties against the benchmark file read as UTF-8 encoded.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyProperty
Verify the value of a single object property
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object property to verify.
-
ExpectedValue
The case-sensitive value we expect to get from the object property.
- [ CaseInsensitive = ]
Values of "CASE-INSENSITIVE", "CASEINSENSITIVE", and "FALSE" will cause the
comparison of the property value and the expected value to ignore case.
Examples:
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyPropertyContains
Verify that the value of an object property contains a string
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object property to verify.
-
SearchString
The case-sensitive value we expect the object property to contain.
- [ CaseInsensitive = ]
Values of "CASE-INSENSITIVE", "CASEINSENSITIVE", and "FALSE" will cause the
comparison of the property value and the expected value to ignore case.
Examples:
-
T, WindowID, WindowID, VerifyPropertyContains, Value, someSubstring, ^CaseSensitive="False"
Verify the "Vaule" property of WindowID contains the substring "someSubstring".
The comparison will not be case-sensitive.
-
T, WindowID, CheckboxID, VerifyPropertyContains, State, "Unc"
Verify the "State" property of CheckboxID contains the case-sensitive substring "Unc".
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyPropertyToFile
Verify the value of a single object property with a benchmark file
Verify the value of a single object property with a benchmark file.
Typically, benchmarks are stored in the Datapool\Bench directory.
In that event, only the filename.ext is needed. There is currently
a limit of 32K allowed for this type of comparison.
The command will produce a TEST WARNING if the user has configured an
alternate DIFF tool for which we have no means to compare the diff results.
If this WARNING is expected, the user should use the "TW" test record type.
Fields: [ ]=
Optional with Default Value
-
PropertyName
The case-sensitive name of the object property to verify.
-
BenchmarkFile
The name of the file used as the comparison benchmark.
The name of the file used as the comparison benchmark.
Typically, benchmarks are stored in the Datapool\Bench directory.
In that event, only the filename.ext is needed.
- [ FileEncoding = ]
Specify a character encoding to be used when opening a bench file.
If it is not specified, the system default file encoding will be used.
The encoding should be a valid string supported by Java; if it is not valid,
the system default file encoding will be used instead.
- [ FilterMode = ]
(Future) Specify a file filter to use to process the text before comparison.
- [ FilterOptions = ]
(Future) Specify filter options to use with the file filter.
Examples:
-
T, Browser, HTMLTable, VerifyPropertyToFile, "innerText", aFilename.ext, , "", ""
Verify the "innerText" property of HTMLTable with the benchmark file.
Verify the "innerText" property of HTMLTable with the benchmark file.
The benchmark file is located within the Project at Datapool\Bench\aFilename.ext
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Browser, HTMLTable, VerifyPropertyToFile, "innerText", c:\Dir\aFilename.ext
Verify the "innerText" property of HTMLTable with the benchmark file.
Verify the "innerText" property of HTMLTable with the benchmark file.
The benchmark file is not located within the Project. It is at c:\Dir\aFilename.ext
-
T, Browser, HTMLTable, VerifyPropertyToFile, "innerText", c:\Dir\aFilename.ext, "UTF-8"
Verify the "innerText" property of HTMLTable with the benchmark file.
Verify the "innerText" property of HTMLTable with the benchmark file.
The benchmark file is not located within the Project. It is at c:\Dir\aFilename.ext
The benchmark file will be opened with "UTF-8" file-encoding.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyTextFileToFile
Verify the current contents of a text file with a benchmark file (same as VerifyFileToFile).
Verify the current contents of a text file with a benchmark file (same as VerifyFileToFile).
Typically, benchmarks are stored in the Datapool\Bench directory.
Typically, files to test are stored in the Datapool\Test directory.
In that event, the filename.ext is needed for both files.
The Window and Component objects are not validated and have no role.
The Window and Component strings can be any text, but they cannot be blank.
The command may produce a WARNING if a diff tool for which we
have no means to verify the results is configured for use.
Consequently, if these warnings are expected, the user can use the
"TW" test record type to avoid issuing these warnings.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
File used as the comparison benchmark.
File used as the comparison benchmark.
This can be a full path, a relative path, or a file name. If
it is a filename, it is expected to be in the project's
Datapool\Bench directory. If it is a relative path,
FindSQAFile is used to located the file.
-
ActualFile
File used as the comparison file under test.
File used as the comparison file under test.
This can be a full path, a relative path, or a file name. If
it is a relative path or a file name, the command will try to
find the file in the project's Datapool\Test directory.
- [ FilterMode = ]
(Future) Specify a file filter to use to process the text before comparison.
- [ FilterOptions = ]
(Future) Specify filter options to use with the file filter.
Examples:
-
T, Browser, HTMLTable, VerifyTextFileToFile, bFilename.ext, aFilename.ext, "", ""
Verify a test text file with the benchmark file (same as VerifyFileToFile).
Verify the test text file with the benchmark file (same as VerifyFileToFile).
The benchmark file is located within the Project at Datapool\Bench\bFilename.ext
The test file is located within the Project at Datapool\Test\aFilename.ext
Note the unused reserved fields for FileFilter and FilterOptions.
-
T, Anything, AtAll, VerifyTextFileToFile, c:\Dir\bFilename.ext, c:\Dir\aFilename.ext
Verify a test text file with the benchmark file (same as VerifyFileToFile).
Verify the test text file with the benchmark file (same as VerifyFileToFile).
The benchmark file is not located within the Project. It is at c:\Dir\bFilename.ext
The test file is not located within the Project. It is at c:\Dir\aFilename.ext
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValueContains
Verify that a string value contains a substring
Fields: [ ]=
Optional with Default Value
-
Value
The case-sensitive string value to verify.
If this string is blank, the only possible match is
if the SearchString is also blank.
-
SearchString
The case-sensitive value we expect the preceeding string to contain.
If the SearchString is blank, that will match the searched
Value ONLY if that value is also blank.
Note: not true for RobotJ version. In RobotJ
version, if SearchString is blank, then it will always
match. If you want to see if both strings are blank, use
the keyword 'VerifyValues' instead.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, anything, anything, VerifyValueContains, someString, someSubstring
Verify the "someString" string contains the substring "someSubstring".
-
T, anything, anything, VerifyValueContains, "here i am", "re i"
Verify the string "here i am" contains the substring "re i".
-
T, anything, anything, VerifyValueContains, ^myVariable, "substr"
Verify the variable ^myVariable contains the substring "substr".
-
T, anything, anything, VerifyValueContains, "someString", ^myVariable
Verify the string "someString" contains the substring of variable ^myVariable.
-
T, anything, anything, VerifyValueContains, ^yourVariable, ^myVariable
Verify the conents of ^yourVariable contains the contents of variable ^myVariable as a substring.
-
T, anything, anything, VerifyValueContains, ^yourVariable, ^myVariable, "SuppressValue"
Verify the conents of ^yourVariable contains the contents of variable ^myVariable as a substring.
The SUPPRESSed Value argument will not be output into any logged messages.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValueContainsIgnoreCase
Verify that a string value contains a substring, ignoring case.
Fields: [ ]=
Optional with Default Value
-
Value
The case-insensitive string value to verify.
If this string is blank, the only possible match is
if the SearchString is also blank.
-
SearchString
The case-insensitive value we expect the preceeding string to contain.
If the SearchString is blank, that will match the searched
Value ONLY if that value is also blank.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, anything, anything, VerifyValueContainsIgnoreCase, someString, someSubstring
Verify the "someString" string contains the substring "someSubstring".
-
T, anything, anything, VerifyValueContainsIgnoreCase, "here i am", "re i"
Verify the string "here i am" contains the substring "re i".
-
T, anything, anything, VerifyValueContainsIgnoreCase, ^myVariable, "substr"
Verify the variable ^myVariable contains the substring "substr".
-
T, anything, anything, VerifyValueContainsIgnoreCase, "someString", ^myVariable
Verify the string "someString" contains the substring of variable ^myVariable.
-
T, anything, anything, VerifyValueContainsIgnoreCase, ^yourVariable, ^myVariable
Verify the conents of ^yourVariable contains the contents of variable ^myVariable as a substring.
-
T, anything, anything, VerifyValueContainsIgnoreCase, ^yourVariable, ^myVariable, "SuppressValue"
Verify the conents of ^yourVariable contains the contents of variable ^myVariable as a substring.
The SUPPRESSed Value argument will not be output into any logged messages.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValueDoesNotContain
Verify that a string value does NOT contain a substring
Fields: [ ]=
Optional with Default Value
-
Value
The case-sensitive string value to verify.
If this string is blank, the compare value should NOT be blank.
-
SearchString
The case-sensitive value we do NOT want to find in the provided Value.
If the SearchString is blank, success if Value is NOT blank.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, Anything, AtAll, VerifyValueDoesNotContain, "someString", "another"
Verify the "someString" Value does NOT contain the substring "another".
-
T, Anything, AtAll, VerifyValueDoesNotContain, ^myVariable, "substr"
Verify the variable ^myVariable does NOT contain the substring "substr".
-
T, Anything, AtAll, VerifyValueDoesNotContain, "someString", ^myVariable
Verify the string "someString" does NOT contain the substring contained in variable ^myVariable.
-
T, Anything, AtAll, VerifyValueDoesNotContain, "someString", ^myVariable, "SuppressValue"
Verify the string "someString" does NOT contain the substring contained in variable ^myVariable.
The SUPPRESSed Value argument will not be output into any logged messages.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValues
Verify that two string values are identical. Note: RobotJ
also uses identical keyword 'VerifyValueEquals'
Fields: [ ]=
Optional with Default Value
-
Value1
A case-sensitive string value to compare.
If this string is blank, the only possible match is
if Value2 is also blank.
-
Value2
A case-sensitive value to compare.
If this string is blank, the only possible match is
if Value1 is also blank.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, anything, anything, VerifyValues, ^myVariable, "astring"
Verify the variable ^myVariable matches the string "astring".
-
T, anything, anything, VerifyValues, "astring", ^myVariable
Verify the variable ^myVariable matches the string "astring".
-
T, anything, anything, VerifyValues, ^yourVariable, ^myVariable
Verify the value of ^yourVariable matches the value of variable ^myVariable.
-
T, anything, anything, VerifyValues, ^yourVariable, ^myVariable, "SuppressValue"
Verify the value of ^yourVariable matches the value of variable ^myVariable.
The SUPPRESSed Value argument will not be output into any logged messages.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValuesIgnoreCase
Verify that two string values are identical, ignoring case.
Fields: [ ]=
Optional with Default Value
-
Value1
A case-insensitive string value to compare.
If this string is blank, the only possible match is
if Value2 is also blank.
-
Value2
A case-insensitive value to compare.
If this string is blank, the only possible match is
if Value1 is also blank.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, anything, anything, VerifyValuesIgnoreCase, ^myVariable, "aSTring"
Verify the variable ^myVariable matches the string "aSTring", ignoring case.
-
T, anything, anything, VerifyValuesIgnoreCase, "asTRing", ^myVariable
Verify the variable ^myVariable matches the string "asTRing", ignoring case.
-
T, anything, anything, VerifyValuesIgnoreCase, ^yourVariable, ^myVariable
Verify the value of ^yourVariable matches the value of variable ^myVariable, ignoring case.
-
T, anything, anything, VerifyValuesIgnoreCase, ^yourVariable, ^myVariable, "SuppressValue"
Verify the value of ^yourVariable matches the value of variable ^myVariable, ignoring case.
[How To Read This Reference]
Selenium GenericMasterFunctions::VerifyValuesNotEqual
Verify that two string values are NOT identical.
Fields: [ ]=
Optional with Default Value
-
Value1
A case-sensitive string value to compare.
If this string is blank, the only possible success is
if Value2 is NOT blank.
-
Value2
A case-sensitive value to compare.
If this string is blank, the only possible success is
if Value1 is NOT blank.
- [ SuppressValue = ]
Set to "SUPPRESSVALUE" to prevent the logging of ugly multi-line values.
The case-insensitive value "SUPPRESSVALUE" instructs the implementation to NOT
log the Value when logging. This is generally
useful with Values that are exceedingly long, or contain large volumes
of text that will break-up the format or readability of the output log.
NOTE:
TC : TID : First implemented in May 2014 for TCAFS and might not be supported in all engines yet.
Examples:
-
T, Anything, AtAll, VerifyValuesNotEqual, ^myVariable, "astring"
Verify the variable ^myVariable does NOT match the string "astring".
-
T, Anything, AtAll, VerifyValuesNotEqual, "astring", ^myVariable
Verify the variable ^myVariable does NOT match the string "astring".
-
T, Anything, AtAll, VerifyValuesNotEqual, ^yourVariable, ^myVariable
Verify the value of ^yourVariable does NOT match the value of variable ^myVariable.
-
T, Anything, AtAll, VerifyValuesNotEqual, ^yourVariable, ^myVariable, "SUPPRESSVALUE"
Verify the value of ^yourVariable does NOT match the value of variable ^myVariable.
The SUPPRESSed Value argument will not be output into any logged messages.
[How To Read This Reference]