GenericMasterFunctions

Last Updated:

Generic actions available for ALL types of Windows and Components.


[How To Read This Reference]
AssignPropertyVariableRational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium Assign the string value of an object property to a specific DDVariable
CaptureObjectDataToFileRational Robot ClassicRational RobotJSelenium Copy the current contents of an object's data to a file.
CapturePropertiesToFileRational RobotJ Copy all of the value properties a test object to a file.
CapturePropertyToFileRational RobotJ Copy a propertie's value of a test object to to a file.
ClearAppMapCacheRational RobotJ Clear the internal application map cache.
GetGUIImageRational Robot ClassicRational RobotJSAFS TID CommandsSelenium Capture the screen shot of a GUI component and save it to a file
GUIDoesExistRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerSelenium Routine to verify the visual existence of a particular window and/or component.
GUIDoesNotExistRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerSelenium Routine to verify the visual non-existence of a particular window and/or component.
HoverMouseRational Robot ClassicRational RobotJ Hover the mouse over an object.
InputCharactersRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerAbbot CommandsSelenium Sends literal text to the specified component.
InputKeysRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerAbbot CommandsSelenium Sends keystrokes to the specified component.
SetPropertyValueRational Robot ClassicRational RobotJ Sets a value to the property of an object.
VerifyArrayPropertyToFileRational Robot ClassicRational RobotJMercury Interactive WinRunner Verify the value of an array property with a benchmark file
VerifyBinaryFileToFileRational Robot ClassicRational RobotJSAFS TID Commands Verify the current contents of a binary file with a benchmark file.
VerifyClipboardToFileRational Robot ClassicRational RobotJMercury Interactive WinRunner Verify the current contents of the Windows clipboard with a benchmark file.
VerifyClipboardVPRational Robot ClassicMercury Interactive WinRunner Verify the current contents of the Windows clipboard using a Robot ClipboardVP.
VerifyFileToFileRational Robot ClassicRational RobotJSAFS TID Commands Verify the current contents of a text file with a benchmark file (same as VerifyTextFileToFile).
VerifyGUIImageToFileRational Robot ClassicRational RobotJSAFS TID CommandsSelenium Verify the screen shot of a GUI component with a benchmark image file
VerifyObjectDataToFileRational Robot ClassicRational RobotJ Verify the current contents of an object's data with a benchmark file.
VerifyPropertyRational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium Verify the value of a single object property
VerifyPropertyContainsRational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium Verify that the value of an object property contains a string
VerifyPropertyToFileRational Robot ClassicRational RobotJMercury Interactive WinRunner Verify the value of a single object property with a benchmark file
VerifyTabOrderRational Robot ClassicMercury Interactive WinRunner Attempts to verify the tab order of the specified object--usually a Window.
VerifyTextFileToFileRational Robot ClassicRational RobotJSAFS TID Commands Verify the current contents of a text file with a benchmark file (same as VerifyFileToFile).
VerifyValueContainsRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner Verify that a string value contains a substring
VerifyValuesRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner Verify that two string values are identical. Note: RobotJ also uses identical keyword 'VerifyValueEquals'
VerifyValuesIgnoreCaseRational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner Verify that two string values are identical, ignoring case.

GenericMasterFunctions::AssignPropertyVariable Rational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium

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.


GenericMasterFunctions::CaptureObjectDataToFile Rational Robot ClassicRational RobotJSelenium

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.

GenericMasterFunctions::CapturePropertiesToFile Rational RobotJ

Copy all of the value properties a test object to a file.

Copy all of the value properties a test object to a file. The format is 'propertyName#propertyValue' where the actual delimter used is not necessarily #, but the test record data separator secified (safs/hook/separator). 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.

GenericMasterFunctions::CapturePropertyToFile Rational RobotJ

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.

GenericMasterFunctions::ClearAppMapCache Rational RobotJ

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)

GenericMasterFunctions::GetGUIImage Rational Robot ClassicRational RobotJSAFS TID CommandsSelenium

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). 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) Specific Notes:
1) This command requires that Java Advanced Imaging (JAI) be installed on the test machine.



Fields: [ ]=Optional with Default Value
  1. 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.

  2. [ 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%").

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

[How To Read This Reference]

GenericMasterFunctions::GUIDoesExist Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerSelenium

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.



GenericMasterFunctions::GUIDoesNotExist Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerSelenium

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.



GenericMasterFunctions::HoverMouse Rational Robot ClassicRational RobotJ

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.

Robot Classic (RC) Specific Notes:
1) 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).



Fields: [ ]=Optional with Default Value
  1. [ 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.



  2. [ HoverTime = 2000 ]
    (Optional)Number of milliseconds to hover.

    If not specified, the mouse will hover for 2000 milliseconds over the object,

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, 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]

GenericMasterFunctions::InputCharacters Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerAbbot CommandsSelenium

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.



GenericMasterFunctions::InputKeys Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunnerAbbot CommandsSelenium

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
  1. TextValue
    String of keystrokes to send.


Examples:
  • T, WINDOW, COMPONENT, INPUTKEYS, "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.

    Some Special Characters:
                    {Enter}= ENTER key
                    {Tab} = TAB key
                    ^ = CONTROL Key with another key ( "^S" = CONTROL + s)
                    %= ALT  Key with another key ("%F" = ALT + F)
                    + = SHIFT key with another key ("+{Enter}" = SHIFT + ENTER)
                    

    Currently, we pass-thru to the underlying implementation (Rational SQABasic). Any future implementations will also use the same syntax. Note: Only valid for components that accept windows keyboard input

    Important Abbot note. Presently, no special character handling is in place. If using the Abbot engine the keys will be sent litterally without interpretation. For example, {TAB} would be sent as those exact characters NOT the tab key.



[How To Read This Reference]

GenericMasterFunctions::SetPropertyValue Rational Robot ClassicRational RobotJ

Sets a value to the property of an object.

Routine to set a value to the property of an object.

.

The routine expects that the given object already has Context or Focus. It also expects that Global StepDriverTestInfo contains all the information it needs to perform its function.

The routine will set the StepDriverTestInfo.statuscode and log any pass/fail info using the StepDriverTestInfo.fac LogFacility.

RJ implementation directly modifies the object in the software under test;therefore, it should be done with extreme care. Avoid using setPropertyValue whenever possible because it allows you to modify the software under test in ways that a typical user cannot.



GenericMasterFunctions::VerifyArrayPropertyToFile Rational Robot ClassicRational RobotJMercury Interactive WinRunner

Verify the value of an array 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.

Note: for RobotJ,Suggest to use RFT Inspector to confirm which property should be used. There are two examples:

  1. For Java swing List and ComboBox items can be fetchedusing the '.itemText' property (Note the dot)
  2. For Html List (type is html.select) items can be fetchedusing the '.text' property (Note the dot)



GenericMasterFunctions::VerifyBinaryFileToFile Rational Robot ClassicRational RobotJSAFS TID Commands

Verify the current contents of a binary file with a benchmark file.

Verify the current contents of a binary 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.

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
  1. 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.


  2. 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.


  3. [ FilterMode = ]
    (Future) Specify a file filter to use to process the text before comparison.


  4. [ FilterOptions = ]
    (Future) Specify filter options to use with the file filter.


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


[How To Read This Reference]

GenericMasterFunctions::VerifyClipboardToFile Rational Robot ClassicRational RobotJMercury Interactive WinRunner

Verify the current contents of the Windows clipboard with a benchmark file.

Verify the current contents of the Windows clipboard 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 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 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.



GenericMasterFunctions::VerifyClipboardVP Rational Robot ClassicMercury Interactive WinRunner

Verify the current contents of the Windows clipboard using a Robot ClipboardVP.

Verify the current contents of the Windows clipboard using a Robot ClipboardVP.
The benchmark VP must already exist as an asset of the currently running script.

If the provided VP is NOT a reference in the AppMap then a standard VP compare will occur with the typical VP parameter value like "VP=StoredVP".
However, if you wish to modify the ClipboardVP parameter values, such as specifying that the expected result = FAIL, then you must make an entry in the AppMap under the Component name to provide these modified parameters.

The Window and Component objects are not validated and normally have no role. The Window and Component strings can normally be any text, but they cannot be blank.
However, the Component must be a valid section in the AppMap if we wish to store modified VP parameter settings.



Fields: [ ]=Optional with Default Value
  1. VPName
    The name of the ClipboardVP from the currently running script.


Examples:
  • T, Nonsense, NonsenseToo, VerifyClipboardVP, ClipboardContentsVP
    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "ClipboardContentsVP".

    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "ClipboardContentsVP".
    No AppMap references for the ClipboardContentsVP performs a normal comparison.


  • T, Browser, Browser, VerifyClipboardVP, BrowserContentsVP
    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "BrowserContentsVP".

    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "BrowserContentsVP".
    If "BrowserContentsVP" is NOT in the AppMap then a VP compare will occur with the typical VP parameter value like VP=BrowserContentsVP.

    However, if you wish to modify the ClipboardVP parameter values, such as specifying that the expected result = FAIL, then you must make an entry in the AppMap under the Component name to add these modified parameters.

    AppMap Example for Example #1: [Browser] Browser=Type=Window.... ... BrowserContentsVP=ExpectedResult=FAIL;Wait=1,5


  • T, Browser, HTMLTable, VerifyClipboardVP, TableContentsVP
    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "TableContentsVP".

    Verify the current contents of the Windows clipboard using the stored Robot ClipboardVP "TableContentsVP".
    If "TableContentsVP" is NOT in the AppMap then a VP compare will occur with the typical VP parameter value like VP=TableContentsVP.

    However, if you wish to modify the ClipboardVP parameter values, such as specifying that the expected result = FAIL, then you must make an entry in the AppMap under the Component name to add these modified parameters.

    AppMap Example for Example #2: [Browser] Browser=Type=Window.... HTMLTable=Type=HTMLTable.... [HTMLTable] TableContentsVP=ExpectedResult=FAIL;Wait=1,5


[How To Read This Reference]

GenericMasterFunctions::VerifyFileToFile Rational Robot ClassicRational RobotJSAFS TID Commands

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
  1. 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.


  2. 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.


  3. [ FilterMode = ]
    (Future) Specify a file filter to use to process the text before comparison.


  4. [ 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]

GenericMasterFunctions::VerifyGUIImageToFile Rational Robot ClassicRational RobotJSAFS TID CommandsSelenium

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. 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.



Fields: [ ]=Optional with Default Value
  1. 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.

  2. [ 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%").

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.jpg"
    Verify the full component image with JPEG file "<project>\Datapool\Bench\comp.jpg"


  • 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


[How To Read This Reference]

GenericMasterFunctions::VerifyObjectDataToFile Rational Robot ClassicRational RobotJ

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.



GenericMasterFunctions::VerifyProperty Rational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium

Verify the value of a single object property


GenericMasterFunctions::VerifyPropertyContains Rational Robot ClassicRational RobotJMercury Interactive WinRunnerSelenium

Verify that the value of an object property contains a string


GenericMasterFunctions::VerifyPropertyToFile Rational Robot ClassicRational RobotJMercury Interactive WinRunner

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.



GenericMasterFunctions::VerifyTabOrder Rational Robot ClassicMercury Interactive WinRunner

Attempts to verify the tab order of the specified object--usually a Window.

Attempts to verify the tab order of the current object--usually a Window. A file is used to store the correct tab order of the interface.

The file is simply a list of component names in the order we expect to find them as we tab through the interface. Each line in the file will contain a single component name. That can be either the real valid Name given to the component by development, or the name for the component from the AppMap. The AppMap name is highly recommended to reduce maintenance of the tab order file. Blank lines or commented lines are ignored. Comment lines begin with apostrophe(') or semi-colon(;) characters.

Example file:

  • ;Tab Order Benchmark File
  • ;For ClassicC Login Window
  • (blank)
  • UserIDComboBox
  • PasswordEditBox
  • RememberCheckBox
  • (blank)
  • OKButton
  • CancelButton
This file would normally be placed in the Datapool\Bench directory.

The function will verify that the object order in the interface is the same object order that is in the file. This is done by checking the FOCUS Property of the current object and using the TAB key for navigation. Thus, navigation by the TAB key must be supported by the application.

The routine will only check the tab order for the number of items found in the tab order benchmark file. Thus, the user can perform partial tests on different portions of the interface at different times. Just make sure that the item that currently has the focus is the first item in the tab order benchmark file when invoking this command.



GenericMasterFunctions::VerifyTextFileToFile Rational Robot ClassicRational RobotJSAFS TID Commands

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
  1. 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.


  2. 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.


  3. [ FilterMode = ]
    (Future) Specify a file filter to use to process the text before comparison.


  4. [ 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]

GenericMasterFunctions::VerifyValueContains Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner

Verify that a string value contains a substring


GenericMasterFunctions::VerifyValues Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner

Verify that two string values are identical. Note: RobotJ also uses identical keyword 'VerifyValueEquals'


GenericMasterFunctions::VerifyValuesIgnoreCase Rational Robot ClassicRational RobotJSAFS TID CommandsMercury Interactive WinRunner

Verify that two string values are identical, ignoring case.