$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
 Constants and Globals
 Description, mkMapper-All Functions and Subroutines
 Exported Constants
 Exported Routines
 File scope variables
 mkMapper-All Functions and Subroutines
 mkMapper-Exported Functions and Procedures
 mkMapper-Exported Types,Constants and Globals
 Private Functions
 Public Functions
associative array of all object names, used to ensure no two objects have the same friendly name in a screen
used by getObjectCoordinates to determine if we need to save the values for WindowOffsetX and WindowOffsetY
Function checkDialogInput As String
This function checks to make sure all the form values have been filled in correctly
function CreateAppMap (applicationName As String,
screenName As String,
windowCaption As String,
Optional logLevel As Variant,
Optional outputPath As Variant) As Integer
Process a screen of an application and generate the map for that screen
Function CreateAppMapDialog As Integer
Creates a GUI dialog that is used to control the application mapping process.
function createNewMapFile (applicationName As String) As Object
Creates a new Map DOM document with the core processing instructions and the map node with the application name.
This library implements an object mapper for Rational Robot.
holds the application name from the mapper dialog
holds the log level from the mapper dialog
holds the file output path from the mapper dialog
tracks if we’ve succesfully executed the mapper dialog once
holds the screen name from the mapper dialog
holds the window caption from the mapper dialog
Function ensureUniqueObjectName (objectName As String) As String
Make sure the friendly object name we’re about to use is unique.
Used internally by the library but not exported
Function getDateStamp As String
Returns a date/time stamp for the current time, like the standard ISO 8601 date/time format minus the timezone (CCYY-MM-DDTHH:MM:SS)
Function getDefaultMapPath As String
Gets the default map path, which is {SQA_DIR_PROJECT}\testdata\maps.
Function getMapFileAttributes (mapFile As String) As Integer
Returns the attributes for the given map file
Function getObjectCoordinates(recStr As String) As Object
This function stores the coordinates of the object.
Function getObjectDetails(recStr As String,
objectNode As Object) As Integer
Get’s all the objects details that we want to save and stores them in to objectNode.
Function getObjectNameFromRecognition(recStr As String) As String
This function will attempt to generate a user-friendly unique name for an object.
Function GetRecFromMap(screenName As String,
objectName As String) As String
Once a map has been loaded, this function is used to retrieve the recognition string for an object.
function getScreenNode (screenName As String) As Object
Returns a new empty screen map node for the current screen.
Sub initLogLevelNames
Initializes the LogLevelNames array
Sub LoadMap (map As String,
Optional logLevel As Variant)
Loads an application map DOM.
the lowest level of logging, for development purposes only
the highest level of logging, anything logged at this level resulted in a failed run
informational messages, usefule, but not vital to know
Constants used to set the logging level for the mapper
these could be problems, but don’t necessarily mean the run failed
Sub logEntry (logLevel As Integer,
entry As String)
A simple logging funtion to log strings to the global LogFile.
handle to the global log file, opened in CreateAppMap and used by logEntry
the level to log at, defaults to LOG_WARN
an array of strings holding the friendly names for the logging levels
Sub logToConsole (logLevel As Integer,
entry As String)
A simple logging funtion to log strings to the console.
We’re unable to retrieve the recognition string for the given screen and object
The map DOM hasn’t been loaded yet
Unable to load COM object into app
The map file couldn’t be loaded in to the MSXML DOM object
The map file given couldn’t be found
Exceptions that can be raised by the LoadMap and GetRecFromMap functions
the XMLDomDocument that represents our map.
does the map file already exist? 
For more details, please see mkMapper.sbl
For more details, please see mkMapper.sbl
function openMapFile (mapFilePath As String,
applicationName As String) As Object
Open the map file given in the file name parameter and return it as an XMLDomDocument object.
Functions that are not exported by the library
Function processMapDialog (objectID As String,
action As Integer,
extraInfo As Long) As Integer
This is the callback function used to process the dialog generated by the CreateAppMapDialog function.
Function processObject (recStr as String,
parentNode As Object) As Integer
This function is at the heart of the mapper.
Functions that are exported by the library
global VB RegExp object used for all our regular expressions
function saveMapFile (mapFilePath As String) As Integer
Attempts to save the new map DOM to file on disk.
holds the version of the screen node we’re creating
Function searchRecognitionForName (recStr As String,
elementRE As String) As String
This helper function for getObjectNameFromRecognition performs the actual search of the recognition string for the elements that will be used to create the object name.
Function storeCDATAIntoNode (nodeName As String,
CDATA As String) As Object
This function will create a new dom element (using the node name we supply).
Function storeObjectProperties (recStr As String,
objectNode As Object) As Integer
Stores the objects properties (as returned by SQAGetPropertyNames) into the object node
Function storeTextIntoNode (nodeName As String,
data As String) As Object
This function will create a new dom element (using the node name we supply).
Function stripParentFromChildInName(recStr As String) As String
It happens sometimes that Robot finds a child with a Name property that looks like ‘Name=parentName.childName’.
Function takeSnapshot (recStr As String,
screenShotPath As String) As Integer
Uses the Snapshot function defined in the QuickSnap library to take a snapshot of an application given the applications parent window rec string.
the X offset of the main window from the windows desktop
the Y offset of the main window from the windows desktop