DDDriverCommands::AppMapChaining
Enable and Disable support for App Map chaining.
The SAFSMAPS service historically looked for values in the 'default' AppMap.
This is typically the last AppMap that was OPENed. This service will now lookup
values in what is called the AppMap 'chain'. This chain is simply a
Last-In-First-Out (LIFO) buffer of open AppMaps. As an AppMap is OPENed it is
placed at the top of the search chain. AppMaps already in the chain are moved
down the chain and searched in a LIFO order. This allows a primary AppMap to
be OPENed that might contain many default and shared values while subsequently
opened AppMaps might have overriding entries, entries that build upon the
defaults, or contain locale-specific entries for things like NLS testing.
Support is currently provided via the SAFSMAPS service.
DDDriverCommands::AppMapResolve
Enable and Disable support for embedded DDVariables in App Map strings.
When enabled (ON), the App Map processor will resolve DDVariable references when
they are wrapped in curly braces {^varName} anywhere in the value portion of an
AppMap entry. There should be no spaces anywhere between the curly braces or the
variable will be considered literal text and will not be resolved.
;these two items have no section identifier
;they are part of an initial, unnamed section
AnItem = A normal static value
NewItem = Another static value
[ASection]
AnItem = A normal static value
Item2 = Type=Component;Text={^text}
Item3 = Type=Window;Caption={^caption};\;Type=CheckBox;Text={^text}
The syntax for Item2 specifies that the value of the DDVariable ^text should be
retrieved and embedded in the value provided for Item2.
The syntax for Item3 specifies that the value of the DDVariables ^caption and
^text should be retrieved and embedded in the value provided for Item3.
Support is currently provided via the SAFSMAPS service.
DDDriverCommands::AssignClipboardVariable
Copy the clipboard contents to a DDVariable.
Copy the clipboard contents to a DDVariable.
This command can only copy text contents of the clipboard.
Fields: [ ]=
Optional with Default Value
-
VarName
The variable to copy the clipboard text into.
The routine will strip off any leading "^" if it is provided.
Examples:
[How To Read This Reference]
DDDriverCommands::CallRemote
Execute a command on an external system / application.
Execute a command on an external system / application. This command presently supports only the STAF protocol.
Command syntax, parameters, and values will be dependent upon the protocol specified and
the command issued to the remote (or even local) system.
Fields: [ ]=
Optional with Default Value
-
Protocol
The name of the protocol to use. Presently only 'STAF' is supported.
-
SystemName
The name of the system to send the command to.
-
ServiceName
The service name to be called on the external system / application.
-
Command
The service command to be issued to the external system / application.
- [ VarName = result ]
The DDVariable root name to receive the results.
Variable root name defaults to 'result' if not provided.
The variables varName.RC and varName.RESULT are defined on completion of the command.
- [ Parameters = ]
Additional parameters to be passed to the service command.
Examples:
-
C CallRemote STAF LOCAL PING PING
Send the STAF command PING PING to the local system, and assign the result to the result root name variable.
-
C CallRemote STAF ext-1 HANDLE QUERY myResult ALL
Send the STAF command HANDLE QUERY ALL to the external system ext-1 and assign the results to the myResult root name variable.
[How To Read This Reference]
DDDriverCommands::CaptureMousePositionOnScreen
Capture the location of the mouse pointer relative to the screen and save the x and y components into variables.
Fields: [ ]=
Optional with Default Value
-
X_VariableName
The name of the DDVariable to store the X component of the mouse position.
-
Y_VariableName
The name of the DDVariable to store the Y component of the mouse position.
Capture the current position of the mouse on the screen.
The X component of the returned coordinate is saved into
the DDVariable given as the first parameter.
The Y component of the returned coordinate is saved into
the DDVariable given as the second parameter.
Examples:
[How To Read This Reference]
DDDriverCommands::ClearAllVariables
Clear storage of all DDVariables.
DDDriverCommands::ClearAppMapCache
Clear the internal application map cache.
Engines often maintain an internal cache for AppMap data.
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 new
instance. 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)
DDDriverCommands::ClearArrayVariables
Clear storage of all SAFS variables containing a specific prefix.
Users can use SAFSVARS to store pseudo-arrays simply by adding a numeric suffix to any vaiable name prefix.
For example:
TCAFS.UID.1
TCAFS.UID.2
TCAFS.UID.3
This command allows you to clear/delete all such SAFSVARS array variables with a specific prefix.
DDDriverCommands::ClearClipboard
Clear the contents of the Window's clipboard.
DDDriverCommands::CloseApplication
DRD |
RC |
RJ |
IOS |
TID |
SDC |
SE2 |
WR |
Close a named application process launched with LaunchApplication.
Currently we can only TERMINATE processes successfully
providing a TASKID during LaunchApplication. If we were
unable to get a TASKID, then we will not be able to
terminate the task with this command.
For IOS: This simply tries to close any and all instances of the
running XCode Instruments application that is driving the IOS tests.
For Android testing: The AUT information is configured via the test INI file and
the installed APKs. There are no parameters to provide to the CloseApplication call when
closing the application under test.
Fields: [ ]=
Optional with Default Value
-
ApplicationID
The Application ID or reference provided to LaunchApplication
For IOS: The ApplicationID can be anything because it is ignored.
The IOS engine simply shuts down all running IOS Instruments applications.
Examples:
[How To Read This Reference]
DDDriverCommands::CloseApplicationMap
By map ID, Close a opened Application Map in map chain.
By map ID, Close a opened Application Map in map chain. Closing an App Map releases all resources
used by the map and removes it from any active App Map chaining. If the closed App Map
was the "default" map then the next App Map in the chain becomes the "default" App Map.
Fields: [ ]=
Optional with Default Value
-
ApplicationMap
The path and/or filename (ID) of the Application Map to close.
The path and/or filename (ID) of the Application Map to close. This must be the same
path or filename used when the App Map was opened. The short filename
without the path can be used if the file can be found via internal search algorithms.
Typically, the AppMap is located in the project's Datapool directory.
Examples:
-
C, CloseApplicationMap, NotePad.Map
Close the Notepad.map App Map in the Datapool directory.
The App Map must have been opened with the same short name information.
-
C, CloseApplicationMap, "C:\SomeDir\NewApp.Map"
Close the NewApp.map Application Map.
The App Map must have been opened with the same fullpath information.
[How To Read This Reference]
DDDriverCommands::CopyVariableValueEx
Copy the value of a (dynamic) DDVariable to another.
Both fields can contain literal strings, DDVariables, or
any expression that evaluates to a valid variable name. The primary
purpose of this is to allow for dynamic variable creation via expressions.
That is something that "SetVariableValues" cannot do.
Fields: [ ]=
Optional with Default Value
-
SourceVariable
The name of the variable to copy.
-
DestinationVariable
The name of the variable to receive the copy
Examples:
-
C, CopyVariableValueEx, srcvar, destvar
Copy the value of variable srcvar to variable destvar (euivalent to ^destvar=^srcvar)
-
C, CopyVariableValueEx, ^srcvarname, ^destvarname
Given ^srcvarname contains "srcvar" and ^destvarname contains "destvar",
this sets ^destvar to ^srcvar
-
C, CopyVariableValueEx, ^basename & ^index, destvar
Any expression that evaluates to a valid DDVariable name may be used.
[How To Read This Reference]
DDDriverCommands::Delay
Delay for a specified number of milliseconds.
DDDriverCommands::DisableDomain
Disable a particular test domain for testing.
Some tools support multiple test domains like Java, Html, Net, and Win domains.
This command instructs the engine to dynamically disable a particular test domain.
This is the opposite of, and often used in conjunction with the command 'EnableDomain'.
Disabling unnecessary domains may drastically improve test performance.
Fields: [ ]=
Optional with Default Value
-
Domain
The generic name of the domain to disable.
The name might be engine-specific, but the domain names should
attempt to conform to:
Domain names should not be case-sensitive.
Examples:
[How To Read This Reference]
DDDriverCommands::EnableDomain
Enable a particular test domain for testing.
Some tools support multiple test domains like Java, Html, Net, and Win domains.
This command instructs the engine to dynamically enable a particular test domain.
This is the opposite of, and often used in conjunction with the command 'DisableDomain'.
Disabling unnecessary domains may drastically improve test performance.
Fields: [ ]=
Optional with Default Value
-
Domain
The generic name of the domain to enable.
The name might be engine-specific, but the domain names should
attempt to conform to:
Domain names should not be case-sensitive.
Examples:
[How To Read This Reference]
DDDriverCommands::Expressions
Enable and Disable enhanced expressions.
Enable and Disable enhanced expressions.
When enabled, records are pre-processed for advanced
expressions (math and string) conversions with DDVariables.
When disabled, records are pre-processed with
standard DDVariable conversions for backwards compatibility.
DDDriverCommands::GetAppMapValue
Assign a DDVariable a value from an App Map.
Allows the extraction of an App Map item value into a DDVariable. The user can optionally
provide the App Map ID and Section from which the entry is sought. The default is to
retrieve the value from the default section in the default App Map.
Fields: [ ]=
Optional with Default Value
- [ AppMapID = ]
The ID provided for the AppMap when OPENed.
If this parameter is left empty then the default or "current" App Map is used.
- [ Section = ]
The Section within the App Map to locate the entry.
If this parameter is left empty then the default App Map section is used.
-
Item
The Item within the App Map to retrieve.
This parameter cannot be left empty.
-
varName
The name of the variable to receive the value.
This parameter cannot be left empty.
Examples:
-
C, GetAppMapValue, Classics.MAP, MainWindow, FileMenu, menuRec
Get the value for FileMenu from the Classics.MAP in the MainWindow section and
store it in the DDVariable named ^menuRec.
-
C, GetAppMapValue, , , FileMenu, menuRec
Get the value for FileMenu from the "current" App Map in the default section and
store it in the DDVariable named ^menuRec.
[How To Read This Reference]
DDDriverCommands::GetCompScreenResolution
Gets the current computer screen resolution and returns x and y values.
Gets the current computer screen resolution and returns x and y values.
Fields: [ ]=
Optional with Default Value
-
XWidthVariable
SAFSVARS name to be used to store x screen resolution
-
YHeightVariable
SAFSVARS name to be used to store y screen resolution
Examples:
[How To Read This Reference]
DDDriverCommands::GetDeltaDate
Calculates the delta date positive or negative delta days from the supplied date
Calculates the delta date positive or negative delta days from the supplied date.
The resulting date is in the "Short Date" format.
Fields: [ ]=
Optional with Default Value
-
SourceDateString
String containing the date from which to calculate the delta date
-
DeltaDays
Positive or Negative number of days to calculate date from source date
-
ResultString
Variable name to receive the newly formatted date.
Examples:
[How To Read This Reference]
DDDriverCommands::GetMillisBetweenRecords
Get the pause between two records, and assigns the value to a DDVariable.
Get the pause between two records, and assigns the value to a DDVariable.
This time is milli-seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the pause between two records.
The name of the variable to receive the pause between two records.
Examples:
[How To Read This Reference]
DDDriverCommands::GetRegistryKeyValue
Assign the value of the specified Registry Key to a variable.
On Windows XP (and higher?) this is accomplished via
the REG.EXE provided by the operating system. If this program is NOT available
then the Registry commands will not work until another means is implemented--possibly
Windows Scripting Host scripts, etc..
If the registry key does not exist then a failure will be recorded and no value--an
empty string--will be assigned to the variable.
Fields: [ ]=
Optional with Default Value
-
Key
The Registry Key name to seek.
-
KeyValue
The value name under the parent key to seek.
-
VarName
The name of the variable to receive the value of the registry key.
Examples:
-
C, GetRegistryKeyValue, "HKLM\Software\Adobe\CommonFiles", "AdobeHome", "AdobeHomeVar"
Get the value of the AdobeHome registry key and store it in the ^AdobeHomeVar variable.
If the registry key does not exist then a failure will be recorded and no value--an
empty string--will be assigned to the variable.
[How To Read This Reference]
DDDriverCommands::GetSecsAfterWindowActive
Get the delay after window is activated, and assigns the value to a DDVariable.
Get the delay after window is activated, and assigns the value to a DDVariable.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the delay after window is activated.
The name of the variable to receive the delay after window is activated.
Examples:
[How To Read This Reference]
DDDriverCommands::GetSecsBeforeMouseDown
Get the delay before mouse down, and assigns the value to a DDVariable.
Get the delay before mouse down, and assigns the value to a DDVariable.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the delay before mouse down.
The name of the variable to receive the delay before mouse down.
Examples:
[How To Read This Reference]
DDDriverCommands::GetSecsBeforeMouseUp
Get the delay before mouse up, and assigns the value to a DDVariable.
Get the delay before mouse up, and assigns the value to a DDVariable.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the delay before mouse up.
The name of the variable to receive the delay before mouse up.
Examples:
[How To Read This Reference]
DDDriverCommands::GetSecsDelayRetryComponent
Get the delay of re-finding object, and assigns the value to a DDVariable.
Get the delay of re-finding object, and assigns the value to a DDVariable.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the delay of re-finding object.
The name of the variable to receive the delay of re-finding object.
Examples:
[How To Read This Reference]
DDDriverCommands::GetSecsSeekComponent
Get the timeout of finding object, and assigns the value to a DDVariable.
Get the timeout of finding object, and assigns the value to a DDVariable.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the timeout of finding object.
The name of the variable to receive the timeout of finding object.
Examples:
[How To Read This Reference]
DDDriverCommands::GetSystemDate
Assigns the string value of the system date to a DDVariable.
Assigns the string value of the system date to a DDVariable.
This date is in the format MM-DD-YYYY.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the System Date.
The name of the variable to receive the System Date.
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.
Examples:
-
C, GetSystemDate, SystemDate
Assigns system date to DDVariable ^SystemDate
-
C, GetSystemDate, "SystemDate"
Assigns system date to DDVariable ^SystemDate
-
C, GetSystemDate, "^SystemDate"
Assigns system date to DDVariable ^SystemDate
-
C, SetVariableValues, ^SystemDate="TodaysDate"
C, GetSystemDate, ^SystemDate
Assigns system date to DDVariable ^TodaysDate
[How To Read This Reference]
DDDriverCommands::GetSystemDateTime
Assigns the string value of the system datetime to a DDVariable.
Assigns the string value of the system datetime to a DDVariable.
This date is in the format MM-DD-YYYY HH:MM:SS, it is in AM-PM 12-hours
format (1-12) be default; If you set the second parameter 'GetMilitaryTime'
to True, the time will be 24-hours military format (0-23). Use military time
is recommanded, as am-pm time has confusion without AM or PM
(example: 18:00 and 06:00 will be both 06:00)
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the System DateTime.
The name of the variable to receive the System DateTime.
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.
- [ GetMilitaryTime = ]
If true, the converted time is in 24-hours military time format
If this is true, the converted time will be in 24-hours military time
format (0-23). If this parameter is omitted, it is false be default,
the converted time will be in AM-PM 12-hours format (1-12).
Examples:
-
C, GetSystemDateTime, SystemDate
Assigns system datetime to DDVariable ^SystemDate, the time will
be in 12-hours format (1-12).
-
C, GetSystemDateTime, "SystemDate"
Assigns system datetime to DDVariable ^SystemDate, the time will
be in 12-hours format (1-12).
-
C, GetSystemDateTime, "^SystemDate"
Assigns system datetime to DDVariable ^SystemDate, the time will
be in 12-hours format (1-12).
-
C, SetVariableValues, ^SystemDate="TodaysDate"
C, GetSystemDateTime, ^SystemDate
Assigns system datetime to DDVariable ^TodaysDate, the time will
be in 12-hours format (1-12).
-
C, GetSystemDateTime, SystemMilitaryDate, True
Assigns system datetime to DDVariable ^SystemMilitaryDate, the time will
be in military format, 24-hours (0-23).
[How To Read This Reference]
DDDriverCommands::GetSystemTime
Assigns the string value of the current system time to a DDVariable.
Assigns the string value of the current system time to a DDVariable.
This date is in the format HH:MM:SS, it is in AM-PM 12-hours
format (1-12) be default; If you set the second parameter 'GetMilitaryTime'
to True, the time will be 24-hours military format (0-23). Use military time
is recommanded, as am-pm time has confusion without AM or PM
(example: 18:00 and 06:00 will be both 06:00)
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable to receive the System Time.
The name of the variable to receive the System Time.
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.
- [ GetMilitaryTime = ]
If true, the converted time is in 24-hours military time format
If this is true, the converted time will be in 24-hours military time
format (0-23). If this parameter is omitted, it is false be default,
the converted time will be in AM-PM 12-hours format (1-12).
Examples:
-
C, GetSystemTime, SystemTime
Assigns system time to DDVariable ^SystemTime, the time will
be in 12-hours format (1-12).
-
C, GetSystemTime, "SystemTime"
Assigns system time to DDVariable ^SystemTime, the time will
be in 12-hours format (1-12).
-
C, GetSystemTime, "^SystemTime"
Assigns system time to DDVariable ^SystemTime, the time will
be in 12-hours format (1-12).
-
C, SetVariableValues, ^SystemTime="CurrentTime"
C, GetSystemTime, ^SystemTime
Assigns system time to DDVariable ^CurrentTime, the time will
be in 12-hours format (1-12).
-
C, GetSystemTime, SystemMilitaryTime, True
Assigns system time to DDVariable ^SystemMilitaryTime, the time will
be in military format, 24-hours (0-23).
[How To Read This Reference]
DDDriverCommands::GetURL
Send an HTTP GET request, and get the response.
NOTE:
The optional parameters 'HeaderName' and 'HeaderValue' must appear in pair,
and they can present more than 1 time, which means multiple pair of ('HeaderName', 'HeaderValue')
can be provided.
NOTE:
SE2 : The HTTP request will be sent by javascript AJAX.
Fields: [ ]=
Optional with Default Value
-
URL
The URL to request.
-
Variable
The name of the variable holding the response sent back from the server.
Some suffixes can be appended to the variable name to form new variable holding other values, suffixes list as below:
- .readyState contains 'AJAX Ready State Code', such as "0", "1", "2", "3" and "4".
- .headers contains the response headers
- .status contains the HTTP status code, such as "200", "404" etc.
- .statusText contains the HTTP status text, such as "OK", "Not Found" etc.
- .xml contains the XML response if it exists.
- [ Timeout = ]
The timeout (in seconds) waiting for the response from HTTP server. The default value is 120 seconds.
- [ HeaderName = ]
The HTTP request header name.
- [ HeaderValue = ]
The value to set for the HTTP request header.
Examples:
-
C, GetURL, "http://rest.api.url", "response", "60"
Send an HTTP "GET" request for url "http://rest.api.url" and wait for response with timeout of 60 seconds,
and the variable "response" will hold the request's result from server.
-
C, GetURL, "http://rest.api.url?var1=value&var2=value", "response"
Send an HTTP "GET" request for url "http://rest.api.url?var1=value&var2=value",
and wait for response with the default timeout of 120 seconds,
and the variable "response" will hold the request's result from server.
-
C, GetURL, "http://rest.api.url", "response", "", "Accept", "text/*", "Accept-Charset", "UTF-8"
Send an HTTP "GET" request for url "http://rest.api.url" with headers ("Accept","text/*") and ("Accept-Charset","UTF-8"),
and wait for response with the default timeout of 120 seconds,
and the variable "response" will hold the request's result from server.
[How To Read This Reference]
DDDriverCommands::GetVersion
Get the engine VERSION
Used to specify the VERSION of the engine.
DDDriverCommands::HideSoftKeyboard
Hide the soft keyboard.
Hide the soft keyboard. The soft keyboard will be shown if user click on an edit box,
but the soft keyboard will show over the other components. User can use this keyword
to make this soft keyboard disappear.
DDDriverCommands::HighLight
Turn on or off the component highlight functionality.
When enabled (ON) each call to a component function will temporarily highlight
the targeted component. The intent is to provide a design-time verification that the tool
is finding the desired target component. It is not recommended this command be used during
production runtime testing as there can be significant performance impact with some tools.
Fields: [ ]=
Optional with Default Value
- [ Mode = ]
The status for highlight functionality. It can be On or Off. The Default is OFF.
Examples:
[How To Read This Reference]
DDDriverCommands::LaunchApplication
DRD |
RC |
RJ |
TID |
IOS |
SDC |
SE2 |
WR |
Identify and Launch a specified application
For IOS: This command is used to Launch the IOS Instruments testing tool.
The user-defined Instrument's tracetemplate is used to launch the required application.
The tester must run the Driver Command UseIOSFunctions set to "ON" before
LaunchApplication or the IOS implementation of the command will not be invoked.
For IOS Simulator testing: The Trace Template must be configured to hold all required
information such as:
- the application to be tested
- the IOS SDK Version to use/simulate
- the location for Instruments output logging
For IOS Device testing: The Trace Template should be configured to hold the same
information. However, at runtime the user still has to (re)specify the device name and
application to run in the LaunchApplication CMDLineParams (see below). In addition,
the devicename and/or appname CANNOT contain certain special characters like an apostrophe or
single-quote (') since this will prevent AppleScript from making their proper selection.
For Android testing: The AUT information is configured via the test INI file and
the installed APKs. There are no parameters to provide to the LaunchApplication call when
launching the application to be tested.
Fields: [ ]=
Optional with Default Value
-
ApplicationID
A text ID or name to reference the application
A text ID or name to reference the application. Something to call it
during possible future references in DDE tables or scripts. This is
different than a window ID. It is what we want to call the App itself.
-
ExecutablePath
The path, filename, and parameters for the executable OR an ApplicationConstant.
The path and filename to the executable OR an ApplicationConstant.
This can and should include the full command line syntax with application
specific command line parameters unless the application is unable to
successfully handle this invocation.
This ExecutablePath parameter may instead contain a reference to an
ApplicationConstant from the currently active Application Map. The value
of the retrieved constant will be used as the ExecutablePath.
For IOS: This should resolve to the full path to the Instruments
trace template that will be used to launch the application.
- [ WorkDir = ]
A Working Directory for the application (if required)
A Working Directory for the application (if required).
Do not provide this if it is not required by the application.
If you DO provide this then the DDE cannot automatically terminate
the application if things go really bad.
For IOS: This should resolve to be the path to the directory that will
contain the Instruments output log.
- [ CMDLineParam = ]
Separate command line parameters for the application (if required).
Command line parameters for the application (if required).
Do not provide this if it is not required by the application.
For RRAFS: Try to include all command line parameters within the ExecutablePath
If you DO provide separate command line paratmeters then the RRAFS DDE
cannot automatically terminate the application if things go really bad.
For IOS Device testing: the device and application must be specified exactly
as they will appear in the Instruments "Choose Target" configuration menus. The parameters
should be specified inline as:
- -d [DeviceMenuItem] -app [AppNameMenuItem]
Example: "-d Carls iPad (v5.0) -app UICatalog"
For IOS Simulator testing:
this parameter is not needed and should not contain any -d or -app options.
For compatibility with different inputrecord separators, the SAFS/IOS engine supports
different delimiters to be used with -d and -app. Supported Delimiters are (:;, ).
Examples:
- "-d:Carls iPad (v5.0) -app:UICatalog"
- "-d;Carls iPad (v5.0) -app;UICatalog"
- "-d,Carls iPad (v5.0) -app,UICatalog"
- "-d Carls iPad (v5.0) -app UICatalog"
(Of course, you cannot use a comma delimiter here if the inputrecord itself is comma delimited.)
- [ AppMap = ]
Filename to the Application Map for the application.
Filename to the Application Map for the application.
You can provide a short filename (no path) if the map file can be found by
the FindSQAFile function. Typically, the AppMap is placed in the
project's Datapool directory.
Examples:
-
C, LaunchApplication, NotePad, "notepad.exe c:\sample.txt"
Launch Notepad with parameters allowing the DDE to terminate Notepad.
-
C, LaunchApplication, NotePad, SampleFile
Launch Notepad using the ApplicationConstant "SampleFile" in the current AppMap.
Launch Notepad using the ApplicationConstant "SampleFile" in the current AppMap.
The SampleFile constant in the AppMap might contain the value:
"notepad.exe c:\sample.txt"
-
C, LaunchApplication, MainAUT, "c:\MyApp.EXE", , , MainAppMap.MAP
Launch MainAUT providing a reference to its AppMap.
Launch MainAUT providing a reference to its AppMap.
No working directory or separate command line parameters are provided.
-
C, LaunchApplication, MainAUT, "c:\AppDir\MyApp.EXE", "c:\AppDir\", "-s -e -automation", MainAppMap.MAP
Launch MainAUT providing a working directory, command line parameters, and a reference to its AppMap.
-
C, LaunchApplication, MyIOSApp, MyAppTemplate, TheWorkDir
Launch an IOS App on the IOS Simulator.
MyAppTemplate and TheWorkDir are stored in the Application Map in ApplicationConstants and properly
specify the path to the Trace Template and the path to the Instruments output folder as specified
in the Trace Template.
-
C,LaunchApplication,MyIOSApp, "/Library/safs/samples/UICatalog/UICatalogInstruments.tracetemplate", "/Library/safs/samples/UICatalog/"
Launch an IOS App on the IOS Simulator.
The Trace Template and Output path are specified explicitly (not recommended).
-
C, LaunchApplication, MyIOSApp, MyAppTemplate, TheWorkDir, "-d:iPad2 (v5.0) -app:UICatalog"
Launch an IOS App on the specified IOS Device.
MyAppTemplate and TheWorkDir are stored in the Application Map in ApplicationConstants and properly
specify the path to the Trace Template and the path to the Instruments output folder as specified
in the Trace Template.
The CMDLineParam specifies "-d:Device -app:AppName". The Device and AppName
pieces must be specified exactly as they will appear in the Instruments Choose Target menus.
[How To Read This Reference]
DDDriverCommands::NotifyAndWait
Display a user-defined message dialog and wait until dismissed.
Display a user-defined message dialog and wait until dismissed.
If prompting the user to perform some action the message should indicate the action
should be completed BEFORE the dialog is dismissed. Once the dialog is dismissed
automated test execution proceeds immediately.
Fields: [ ]=
Optional with Default Value
-
Message
The text message to be displayed in the dialog.
The text message to be displayed in the dialog. The message should not contain the
inputrecord field separator character nor linefeeds or carriage returns.
- [ Title = ]
A short user-defined title for the dialog.
A short user-defined title for the dialog. The message should not contain the
inputrecord field separator character nor linefeeds or carriage returns.
Examples:
[How To Read This Reference]
DDDriverCommands::Pause
Pause for a specified number of seconds.
Fields: [ ]=
Optional with Default Value
-
Timeout
The number of seconds to Pause.
Examples:
-
C, Pause, 30
Pause for 30 seconds.
[How To Read This Reference]
DDDriverCommands::SaveClipboardToFile
Save the clipboard contents to a text file.
Save the clipboard contents to a text file.
This command can only save text contents of the clipboard. The
length of the clipboard text should not exceed 32,767 characters
due to the inherent size limit of SQABasic's String data type.
Fields: [ ]=
Optional with Default Value
-
File
The file to save the clipboard contents to.
The file to save the clipboard contents to.
This can be a full path, a relative path, or a file name.
For relative path, it is appended to the project's path to
build the full path of the file. For file name, the file
is saved under the project's Datapool\Test directory. In
any case the parent folder of the file must exist.
- [ Encoding = ]
The encoding used to write a file.
The encoding used to write a file. If user doesn't specify this
parameter, the "UTF-8" encoding will be used.
Examples:
-
C, SaveClipboardToFile, C:\Temp\myclipboard.txt
Saves the current clipboard contents to C:\Temp\myclipboard.txt
-
C, SaveClipboardToFile, Datapool\myclipboard.txt
Saves the current clipboard contents to Datapool\myclipboard.txt
-
C, SaveClipboardToFile, myclipboard.txt
Saves the current clipboard contents to Datapool\Test\myclipboard.txt
-
C, SaveClipboardToFile, C:\Temp\myclipboard.txt, "ANSI"
Saves the current clipboard contents to C:\Temp\myclipboard.txt with "ANSI" encoding
[How To Read This Reference]
DDDriverCommands::SaveURLToFile
Send an HTTP GET request, and save the response into a file.
NOTE:
The optional parameters 'HeaderName' and 'HeaderValue' must appear in pair,
and they can present more than 1 time, which means multiple pair of ('HeaderName', 'HeaderValue')
can be provided.
NOTE:
SE2 : The HTTP request will be sent by javascript AJAX.
Fields: [ ]=
Optional with Default Value
-
URL
The URL to request.
-
File
The name of the file holding the response sent back from the server.
The file to save the response from the server. This can be a full path, a relative path, or a file name.
For relative path, it is appended to the project's path to build the full path of the file.
For file name, the file is saved under the project's test directory (it is Datapool\Test in SAFS or Acturals in SE+).
In any case the parent folder of the file must exist.
- [ Timeout = ]
The timeout (in seconds) waiting for the response from HTTP server. The default value is 120 seconds.
- [ HeaderName = ]
The HTTP request header name.
- [ HeaderValue = ]
The value to set for the HTTP request header.
Examples:
-
C, SaveURLToFile, "http://rest.api.url", "reponse.txt", "60"
Send an HTTP "GET" request for url "http://rest.api.url" and wait for response with timeout of 60 seconds,
and the request's result from server will be save to file "reponse.txt" under project's test directory.
-
C, SaveURLToFile, "http://rest.api.url?var1=value&var2=value", "result\reponse.txt"
Send an HTTP "GET" request for url "http://rest.api.url?var1=value&var2=value",
and wait for response with default timeout of 120 seconds,
and the request's result from server will be save to file "reponse.txt" under project's result directory,
the folder 'result' must already exist in the project.
-
C, SaveURLToFile, "http://rest.api.url", "c:\test\result\reponse.txt", "", "Accept", "text/*", "Accept-Charset", "UTF-8"
Send an HTTP "GET" request for url "http://rest.api.url" with headers ("Accept","text/*") and ("Accept-Charset","UTF-8"),
and wait for response with default timeout of 120 seconds,
and the request's result from server will be save to file "c:\test\result\reponse.txt".
[How To Read This Reference]
DDDriverCommands::ScrollWheel
Move mouse wheel forward (up) or backward (down).
Move mouse wheel forward (up) or backward (down).
A positive value indicates the wheel was moved forward (up) and a negative value indicates the wheel was moved backward (down).
Fields: [ ]=
Optional with Default Value
-
numClicks
The number of mouse wheel clicks to move.
.
The number of mouse wheel clicks to move.A postive value indicates the wheel was moved forward (up) and a negative value indicates the wheel was moved backward (down).
Examples:
[How To Read This Reference]
DDDriverCommands::SendEmail
Send email notification with attachments.
Send email notification with attachments.
Mutiple TOs, custom subject line, custom message and attachment are allowed.
HTML tag pass into message to display message into HTML format.
NOTE:Prerequisite: Provide mail setting in configuration file (.ini),
you could ask your IT administrator to set them correctly.
[SAFS_DRIVERCOMMANDS]
OUT_MAILSERVER="mail server"
OUT_MAILSERVERPORT=25|465|587
OUT_MAILSERVERPROTOCOL=SMTP|SMTPS|TLS
OUT_MAILUSER=user.name@mail.com
OUT_MAILPASS=user.password
Fields: [ ]=
Optional with Default Value
-
From
Email address sending the Email.
Email address of the user or system sending the email.
-
To
Email addresses to receive the email.
Email addresses to receive the email. Multiple addresses can be specified with semicolon or comma separators--whichever is NOT the field separator for the record.
-
Subject
The Subject of the email.
- [ Message = ]
Text or HTML message.
Text or HTML message can be specified. HTML message requires HTML tag to work properly. The message cannot contain the field separator for the record.
- [ Attachment = ]
Email attachment file path
Email attachment file path. Multiple filepaths (files) can be specified with semicolons or comma separators--whichever is NOT the field separator for the record.
Examples:
[How To Read This Reference]
DDDriverCommands::SetApplicationMap
Provide the Application Map for the DDE to use
Provide the Application Map for the DDE to use. This command must be used
prior to ANY other command or script referencing the AppMap can be used. The
AppMap can also be set by the DDE initialization script or another script with
the function AUSetCurrentAppMap.
In addition to loading the Application Map, WRAFS will also load the GUI Map file
in Winrunner. For this reason, the Application map and GUI Map File must have
the same name.
Fields: [ ]=
Optional with Default Value
-
ApplicationMap
The path and/or filename of the Application Map to use
The path and/or filename of the Application Map to use. The short filename
without the path can be used if the file can be found via FindSQAFile.
Typically, the AppMap is located in the project's Datapool directory.
Examples:
[How To Read This Reference]
DDDriverCommands::SetBenchDirectory
Set/Change the directory in which the framework will find
benchmark files by default.
The path must already exist. If the path is invalid
the previous setting will be retained (and logged).
Any incomplete path will be assumed to be relative
to the current project directory.
DDDriverCommands::SetClipboard
Set the clipboard contents to a string.
Set the clipboard contents to a string.
Fields: [ ]=
Optional with Default Value
-
Str
The string to set the clipboard contents to.
The string to set the clipboard contents to.
Examples:
[How To Read This Reference]
DDDriverCommands::SetContext
Set a Window or Window Component as the current Robot context.
Set a Window or Window Component as the current Robot context.
Note, this does not SetFocus on the object. This
sets an object of reference for future Robot commands. This may
generate an ignored Script Command Failure if the object is not
valid or visible.
This command is not necessary for the normal operation of the DDE
and the processing of Test records. The DDE will automatically
generate numerous SetContext commands during the normal processing
of Test records. This command is for other extraordinary cases not
covered by normal Test record processing.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window.
A reference from the AppMap for the Component within the Window.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
Examples:
[How To Read This Reference]
DDDriverCommands::SetDifDirectory
Set/Change the directory in which the framework will locate
file compare differences.
The path must already exist. If the path is invalid
the previous setting will be retained (and logged).
Any incomplete path will be assumed to be relative
to the current project directory.
DDDriverCommands::SetFocus
Give a Window or Window Component input focus.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window to get input focus.
A reference from the AppMap for the Component within the Window to get input focus.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
This only works on Windows or Components that have a valid Windows HANDLE
(HWND) and can legally receive the focus at the time of the call.
Examples:
[How To Read This Reference]
DDDriverCommands::SetImageDebug
Enable/Disable verbose debug log output and high-res failure snapshots.
By default the image-based testing algorithm writes JPG screenshots to the Datapool\Test
directory when an image search fails to locate the desired image onscreen. These images
can help the user know the state of the system at the time of a specific test failure.
However, these images are not suitable for more advanced debugging purposes such as finding
out 'why' a target image was not found in the screenshot when it appears it should have been
found.
Enabling image debugging allows the system to output full-resolution BMP images into the
Datapool\Test directory instead of JPG images. It also writes more verbose debug information
into the SAFS Debug Log if the user has the Debug Log running during the test.
See: Debug Log Doc
Fields: [ ]=
Optional with Default Value
-
Mode
The boolean status for enabling extended image debugging.
Valid case-insensitive values to enable are "TRUE", "ON", "YES", "1", and "-1".
All other values will disable this mode.
Examples:
[How To Read This Reference]
DDDriverCommands::SetImageFuzzyMatching
Enable/Disable Image-Based Testing Fuzzy Matching.
Allows more robust fuzzy matching on image comparisons during Image-Based Testing.
Image-Based Testing recognition strings must have a BitTolerance (BT) of less than
100% specified for an image that is intended to be found with the fuzzy matching algorithm.
Fields: [ ]=
Optional with Default Value
-
Mode
The boolean status for enabling extended image-based fuzzy matching.
Valid case-insensitive values to enable are "TRUE", "ON", "YES", "1", and "-1".
All other values will disable this mode.
Examples:
[How To Read This Reference]
DDDriverCommands::SetMillisBetweenRecords
Set the pause between two records.
Set the pause between two records.
This time is milli-seconds.
Fields: [ ]=
Optional with Default Value
-
Value
The value of the pause between two records.
The value of the pause between two records.
Examples:
[How To Read This Reference]
DDDriverCommands::SetMultipleThreadSearch
Turn on or trun off the multi-thread-search way to search an image.
Turn on or trun off the multi-thread-search way to search an image.
If set true, program will search an image by multi-thread; If false, program
will use single-thread to search.
Fields: [ ]=
Optional with Default Value
-
OnOrOff
Turn on or turn off multi-thread-search. This parameter should be given as "On" or "Off".
Examples:
[How To Read This Reference]
DDDriverCommands::SetProjectDirectory
Set/Change the framework project directory.
The path must already exist. If the path is invalid
the previous setting will be retained (and logged).
DDDriverCommands::SetRootVerifyDirectory
Set/Change the Bench, Test, and Dif directories
to be subdirectories off of the provided path.
The path must already exist. If the path is invalid
the previous settings for Bench, Test, and Dif will
be retained and a FAILURE will be reported. The Bench,
Test, and Dif subdirectories must also exist.
Any incomplete path will be assumed to be relative
to the current project directory. It is important
to note that the provided path can be valid, yet
the expected "Bench", "Test", and "Dif" subdirectories
may not be valid. In that scenario, no failure
will be reported, and the previous settings for
Bench, Test, and Dif will be retained (and logged).
Fields: [ ]=
Optional with Default Value
-
Path
The full or project relative path to the root directory for
Bench, Test, and Dif.
Examples:
-
C, SetRootVerifyDirectory, "C:\MyRepo\MyProject\AltPath"
Set the new root directory for Bench, Test, and Dif files.
-
C, SetRootDirectory, "AltPath"
Set the new root directory for Bench, Test, and Dif files.
[How To Read This Reference]
DDDriverCommands::SetSecsAfterWindowActive
Set the delay after window is activated.
Set the delay after window is activated.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
Value
The value of the delay after window is activated.
The value of the delay after window is activated.
Examples:
[How To Read This Reference]
DDDriverCommands::SetSecsBeforeMouseDown
Set the delay before mouse down.
Set the delay before mouse down.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
Value
The value of the delay before mouse down.
The value of the delay before mouse down.
Examples:
[How To Read This Reference]
DDDriverCommands::SetSecsBeforeMouseUp
Set the delay before mouse up.
Set the delay before mouse up.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
Value
The value of the delay before mouse up.
The value of the delay before mouse up.
Examples:
[How To Read This Reference]
DDDriverCommands::SetSecsDelayRetryComponent
Set the delay of re-finding object.
Set the delay of re-finding object.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
Value
The value of the delay of re-finding object.
The value of the delay of re-finding object.
Examples:
[How To Read This Reference]
DDDriverCommands::SetSecsSeekComponent
Set the timeout of finding object.
Set the timeout of finding object.
This time is seconds.
Fields: [ ]=
Optional with Default Value
-
VariableName
The value of the timeout of finding object.
The value of the timeout of finding object.
Examples:
[How To Read This Reference]
DDDriverCommands::SetTestDirectory
Set/Change the directory in which the framework will find
test files (captured "actuals") by default.
The path must already exist. If the path is invalid
the previous setting will be retained (and logged).
Any incomplete path will be assumed to be relative
to the current project directory.
DDDriverCommands::SetVariableValueEx
Set the value of a DDVariable
The name field can contain literal string, DDVariable, or
any expression that evaluates to a valid variable name.
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable
-
VariableValue
The value to assign to the variable
Examples:
-
C, SetVariableValueEx, var, value
Set variable var to contain "value" (euivalent to ^var=value)
-
C, SetVariableValueEx, ^varname, value
Given ^varname contains "var", set variable var to "value"
-
C, SetVariableValueEx, ^basename & ^index, value
Any expression that evaluates to a valid DDVariable name may be used for the name field.
[How To Read This Reference]
DDDriverCommands::SetVariableValues
Preset the value of one or more DDVariables
Preset the value of one or more DDVariables.
Each subsequent field can contain one variable expression.
Note: SAFS/DriverCommands and RobotJ actually implement an incompatible
version of this command. However, that version is normally never called by
standard SAFS Drivers.
The variable handling is actually already done before Driver Commands can
be called, and true Drivers or Processors do nothing but log success and return "NoScriptFailure".
The command remains for RobotJ and SAFS/DriverCommands for those people using
not standard Drivers that do not process expressions before this call. These are a rare breed, indeed!
Fields: [ ]=
Optional with Default Value
-
VariableName
The name of the variable along with its value assignment
Examples:
[How To Read This Reference]
DDDriverCommands::ShowSoftKeyboard
Show the soft keyboard.
Show the soft keyboard.
DDDriverCommands::StartWebBrowser
Launch a new web browser and optionally load a document into it.
Windows TID, SDC, and RFT Support:
This command in the above engines now supports using the System default browser.
By default, the System default browser will be used to launch the URL. (Previous
versions of this command were unfortunately hardcoded to use Internet Explorer only.)
In addition, the tester can set a SAFS variable directly or through ApplicationConstants
to provide the full path to an alternate browser executable. By setting and clearing
this variable the tester can switch between using the System default browser and an
alternate browser dynamically during runtime.
Variable Name: SAFSWebBrowserPath
Sample SAFS variable usage:
;Set an alternate browser to use:
C, SetVariableValues, ^SAFSWebBrowserPath="C:\Program Files\Mozilla Firefox\firefox.exe"
;Clear to return to System default browser:
C, SetVariableValues, ^SAFSWebBrowserPath=""
Sample ApplicationConstants usage:
;provide a value used for all browser launches
[ApplicationConstants]
...
SAFSWebBrowserPath="C:\Program Files\Mozilla Firefox\firefox.exe"
(Note: if the tester ever "sets" or clears the SAFS variable then
any ApplicationConstants setting is no longer used.)
Selenium Note:The parameters from 4 are specially for Selenium 2.0 (WebDriver) for now.
The parameters from 8 are extra parameter settings for Selenium 2.0 (WebDriver), they appear as pair(key, value),
for example #8 is the key, #9 is the value; #10 is the key, #11 is the value; and so on.
you can specify extra parameters as many as wanted if they are supported.
Fields: [ ]=
Optional with Default Value
- [ URL = ]
URL of a web resource to load in the new browser instance.
This field can be empty which may produce different results in different browsers.
When using the system default browser on Windows, this empty field will typically
generate a blank web page, or an "about:blank" page.
Some browsers, like Internet Explorer, support other URLs like "about:home"--
which will launch the browser and display whatever the Home page is set to. However,
not all browsers support this.
For consistency, it is usually necessary to include the full URL syntax--including
the protocol portion of the URL (http://, https://, ftp://, etc..).
- [ WindowTag = ]
A WindowTag or Browser ID to call the new browser instance.
This Tag might be used by some test tools to track specific browser instances,
but not all test tools are able to support this type of browser Tagging.
SE2The identifier used to store the webdriver for the opened browser. It can be used to
switch between opened browsers or close one of them.
- [ BrowserName = firefox ]
SE2The browser to open. It can be "explorer", "chrome" or "firefox". "firefox" is default.
- [ timeout = 15 ]
SE2Specifies the amount of time the selenium web driver should wait
when searching for an element if it is not immediately present.
- [ IsRemoteBrowser = true ]
SE2True = use Selenium RemoteDriver.
True = use Selenium RemoteDriver. Otherwise, use the FirefoxDriver,
ChromeDriver or InternetExplorerDriver.
This parameter is ignored now for SE2 as it always uses a RemoteDriver.
- [ ExtraParamKey = ]
- [ ExtraParamValue = ]
SE2The value of the extra parameter indicated by ExtraParamKey above.
Examples:
-
C, StartWebBrowser
Launch a new browser with no special ID and no URL to load.
-
C, StartWebBrowser, "", WebBrowser
Launch a new browser with a WindowTag of WebBrowser and no URL to load.
-
C, StartWebBrowser, "http://aUrl.jsp", WebBrowser
Launch a new browser with a WindowTag of WebBrowser and a URL to load.
-
C, StartWebBrowser, "http://aUrl.jsp"
SE2Launch a new firefox browser with a URL to load.
-
C, StartWebBrowser, "http://aUrl.jsp", "", "FirstTestPage", "firefox", 20
SE2Launch a new firefox browser with a URL to load, this browser will be stored with ID 'FirstTestPage'
and on this page the search of webelement has a timeout of 20 seconds.
-
C, StartWebBrowser, "http://aUrl.jsp", "", "FirstTestPage", "firefox", 20, "", "KEY_PROXY_SETTING", "proxy-server:80"
SE2Launch a new firefox browser with a URL to load, this browser will be stored with ID 'FirstTestPage'
and on this page the search of webelement has a timeout of 20 seconds, and the internet proxy server
has been set to "proxy-server:80" for this browser.
-
C, StartWebBrowser, "http://www.google.com", "", "GoogleMain", "firefox", 20, "", "FirefoxProfile", "myprofile"
SE2Launch a new firefox browser with custom profile "myprofile"
(Create custom profile), Google page will be loaded,
this browser will be stored with ID 'GoogleMain' and on this page the search of webelement has a timeout of 20 seconds.
-
C, StartWebBrowser, "http://www.google.com", "", "GoogleMain", "chrome", 20, "", "user-data-dir", "c:\chrome_custom_data"
SE2Launch a new chrome browser with custom data pool "c:\chrome_custom_data"
(Create custom data pool), Google page will be loaded,
this browser will be stored with ID 'GoogleMain' and on this page the search of webelement has a timeout of 20 seconds.
-
C, StartWebBrowser, "http://www.google.com", "", "GoogleMain", "chrome", 20, "", "user-data-dir", "C:\Users\xxx\AppData\Local\Google\Chrome\User Data"
SE2Launch a new chrome browser with default data pool "C:\Users\xxx\AppData\Local\Google\Chrome\User Data" using the recent chrome user
(chrome://version/, see "Profile Path"), Google page will be loaded,
this browser will be stored with ID 'GoogleMain' and on this page the search of webelement has a timeout of 20 seconds.
-
C, StartWebBrowser, "http://www.google.com", "", "GoogleMain", "chrome", 20, "", "user-data-dir", "C:\Users\xxx\AppData\Local\Google\Chrome\User Data", "profile-directory", "Profile 1"
SE2Launch a new chrome browser with default data pool "C:\Users\xxx\AppData\Local\Google\Chrome\User Data" using the first chrome user
(chrome://version/, see "Profile Path"), Google page will be loaded,
this browser will be stored with ID 'GoogleMain' and on this page the search of webelement has a timeout of 20 seconds.
-
C, StartWebBrowser, "http://www.google.com", "", "GoogleMain", "chrome", 20, "", "excludeSwitches", "disable-component-update; ignore-certificate-errors"
SE2Launch a new chrome browser with temporary data pool and with option '--disable-component-update' and '--ignore-certificate-errors' excluded,
(chrome://version/, see "Profile Path"), Google page will be loaded,
this browser will be stored with ID 'GoogleMain' and on this page the search of webelement has a timeout of 20 seconds.
The value "disable-component-update; ignore-certificate-errors" can also be separated by comma if semicolon conflicts with your test-record-separator
[How To Read This Reference]
DDDriverCommands::StopWebBrowser
Stop an opened web browser indicated by ID.
Stop an opened web browser indicated by ID. This ID is assigned by user
during calling keyword StartWebBrowser.
Fields: [ ]=
Optional with Default Value
- [ BrowserID = MainApp ]
The identifier used to get the webdriver for the opened browser. This ID is assigned by user
during calling keyword StartWebBrowser.
Examples:
[How To Read This Reference]
DDDriverCommands::SwitchWindow
Switch between multiple windows according to its title.
Fields: [ ]=
Optional with Default Value
-
Title
The Title of the window to switch to.
The title can be a normal string; a wildcard string or a regular-expression string.
- [ BrowserID = ]
The ID representing the opened browser from where to search the window.
The browser ID is assigned by user when calling StartWebBrowser.
This parameter is optional, if not provided then the last opened browser will be used.
- [ ExpectedMatchIndex = ]
If more than one windows can be found according to the title, then this parameter
will decide which one to return, the index is 1 based.
The default index is 1, which means the first matched window will be returned.
- [ PartialMatch = ]
If the parameter 'title' will match partially (be sub-string) with
the title of the existing windows.
The default value is false; which means that the parameter 'title'
should be fully matched.
This parameter will only be valid if the parameter 'title' is normal string.
- [ IgnoreCase = ]
If the parameter 'title' will match case-insentitively with
the title of the existing windows.
The default value is true; which means that the parameter 'title'
will be matched case insensitively.
This parameter will only be valid if the parameter 'title' is normal string.
Examples:
-
C, SwitchWindow, "Google"
Switch to the first window having "Google" as title within the last used browser.
-
C, SwitchWindow, "[G|g]oogle"
Switch to the first window having "Google" or "google" as title within the last used browser.
The parameter 'title' is provided as a regular expression.
-
C, SwitchWindow, "Google", "TestGooglePage"
Switch to the first window having "Google" as title within the browser opened with ID "TestGooglePage".
-
C, SwitchWindow, "Google", "TestGooglePage" ,2
Switch to the 2th window having "Google" as title within the browser opened with ID "TestGooglePage".
-
C, SwitchWindow, "gle", "TestGooglePage", 2, true
Switch to the 2th window having title containing "gle" within the browser opened with ID "TestGooglePage".
-
C, SwitchWindow, "Goog", "TestGooglePage", 2, true, false
Switch to the 2th window having title containing "Goog" (case sensitive) within the browser opened with ID "TestGooglePage".
[How To Read This Reference]
DDDriverCommands::TakeScreenShot
Take screenshot and save it to a file on test machine.
Take screenshot and save it to a file on test machine.
Fields: [ ]=
Optional with Default Value
-
FileName
The file to store the screeshot. (For Android Engine, the screenshot is device/emulator's)
The file to store the screeshot. (For Android Engine, the screenshot is device/emulator's)
It can be a full path name;
If it is only a filename, the image will be stored to sub directory "test" of your project;
If it is a filename including path-separator, it will be concatanated to the "datapool" of
your project to create a fullpath file.
- [ Rotatable = ]
For other Engine, this parameter will be ignored.
For Android Engine, if the android application is rotatable, you set this parameter to True. The default is True.
For other Engine, this parameter will be ignored.
For Android Engine, if the android application is rotatable, that is to say the application will adjust its direction
and keep upstraight when you rotate your device. If the android application is rotatable and this
parameter is set to False, the screenshot maybe upside down.
- [ SubArea = ]
Optional sbuarea indicating partial image of the screen to capture.
Optional sbuarea indicating partial image of the screen to capture.
The value 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 screen, i.e. (0,0) and
(0%,0%) are the minimum, and (SCREEN_WIDTH, SCREEN_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 screen is captured
(equivalent to "0,0,100%,100%").
Examples:
-
C, TakeScreenShot, "screenshot.png", Yes
Get the screenshot and save the image to file YourTestProject\Datapool\Test\screenshot.png
-
C, TakeScreenShot, "d:\temp\image\screenshot.png", No
Get the screenshot and save the image to file d:\temp\image\screenshot.png
-
C, TakeScreenShot, "image\screenshot.png"
Get the screenshot and save the image to file YourTestProject\Datapool\image\screenshot.png
-
C, TakeScreenShot, "screenshotPart.png", , "0;0;50%;50%"
Get part of the screenshot and save the image to file YourTestProject\Datapool\Test\screenshotPart.png
[How To Read This Reference]
DDDriverCommands::UseAbbotFunctions
Enable/Disable the switch to "prefer" ABBOT Functions over
any other engine functions.
If enabled, and the ABBOT engine is up and running, the Driver
will always attempt to execute test records through Abbot first before
any other.
If the ABBOT engine is not fully available, this command will generate and
log a WARNING. If the record type contains the "W" (Warning allowed)
modifier then we will issue an appropriate log message, but no WARNING
will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the preference of the engine.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseDroidFunctions
Enable/Disable the switch to "prefer" Droid Functions over
the current engine functions (like Robot Classic).
If enabled and the Droid hooking mechanism is up and running the Driver
will always attempt to execute test records through Droid first before
defaulting to the current engine (like Robot Classic).
If the Droid hook is not fully available, this command will generate and
log a WARNING.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the use of the Droid hook.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseIOSFunctions
Enable/Disable the switch to "prefer" IOS Functions over
any other engine functions.
If enabled, and the IOS engine is up and running, the Driver
will always attempt to execute test records through IOS first before
any other.
If the IOS engine is not fully available, this command will generate and
log a WARNING. If the record type contains the "W" (Warning allowed)
modifier then we will issue an appropriate log message, but no WARNING
will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the preference of the engine.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseQTPFunctions
Enable/Disable the switch to "prefer" QTP Functions over
any other engine functions.
If enabled, and the QTP engine is up and running, the Driver
will always attempt to execute test records through QTP first before
any other.
If the QTP engine is not fully available, this command will generate and
log a WARNING. If the record type contains the "W" (Warning allowed)
modifier then we will issue an appropriate log message, but no WARNING
will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the preference of the engine.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseRobotJFunctions
Enable/Disable the switch to "prefer" RobotJ Hook Component Functions over
Robot Classic Component Functions.
If enabled and the RobotJ hooking mechanism is up and running then StepDriver
will always attempt to execute test records (T) through RobotJ first before
defaulting to Robot Classic.
If the RobotJ hook is not fully available, this command will generate and
log a WARNING. If the record type is "CW" (Warning allowed), then we
will issue an appropriate log message, but no WARNING will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the use of the RobotJ hook.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseSAFSFunctions
Enable/Disable the switch to "prefer" SAFS (SDC) Functions over
the current engine functions (like Robot Classic).
If enabled and the SAFS hooking mechanism is up and running the Driver
will always attempt to execute test records through SAFS first before
defaulting to the current engine (like Robot Classic).
If the SAFS hook is not fully available, this command will generate and
log a WARNING. If the record type contains the "W" (Warning allowed)
modifier then we will issue an appropriate log message, but no WARNING
will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the use of the SAFS hook.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseSeleniumFunctions
Enable/Disable the switch to "prefer" Selenium Functions over
the current engine functions (like Robot Classic).
If enabled and the Selenium hooking mechanism is up and running the Driver
will always attempt to execute test records through Selenium first before
defaulting to the current engine (like Robot Classic).
If the Selenium hook is not fully available, this command will generate and
log a WARNING.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the use of the Selenium hook.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseTestCompleteFunctions
Enable/Disable the switch to "prefer" TestComplete (TCAFS) Functions over
any other engine functions.
If enabled, and the TCAFS engine is up and running, the Driver
will always attempt to execute test records through TCAFS first before
any other.
If the TCAFS engine is not fully available, this command will generate and
log a WARNING. If the record type contains the "W" (Warning allowed)
modifier then we will issue an appropriate log message, but no WARNING
will be counted.
Fields: [ ]=
Optional with Default Value
-
Mode
The switch status for enabling the preference of the engine.
Valid values are "ON" and "OFF".
Examples:
[How To Read This Reference]
DDDriverCommands::UseWebBrowser
Switch to use an opened web browser indicated by ID.
Switch to use an opened web browser indicated by ID. This ID is assigned by user
during calling keyword StartWebBrowser.
Fields: [ ]=
Optional with Default Value
- [ BrowserID = MainApp ]
The identifier used to get the webdriver for the opened browser. This ID is assigned by user
during calling keyword StartWebBrowser.
Examples:
[How To Read This Reference]
DDDriverCommands::VerifyClipboardToFile
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.
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.
- [ Encoding = ]
The encoding used to read a file.
The encoding used to read a file. If user doesn't specify this
parameter, the "UTF-8" encoding will be used.
Examples:
-
C, VerifyClipboardToFile, myclipboard.txt
Verifieis the current clipboard contents to benchmark file myclipboard.txt
-
C, VerifyClipboardToFile, C:\Temp\myclipboard.txt
Verifieis the current clipboard contents to C:\Temp\myclipboard.txt
-
C, VerifyClipboardToFile, C:\Temp\myclipboard.txt, "Ansi"
Verifieis the current clipboard contents to C:\Temp\myclipboard.txt, the file
will be opened with "Ansi" encoding.
[How To Read This Reference]
DDDriverCommands::VerifyURLContent
Send an HTTP GET request, and verify the response with the content provided as parameter.
NOTE:
The optional parameters 'HeaderName' and 'HeaderValue' must appear in pair,
and they can present more than 1 time, which means multiple pair of ('HeaderName', 'HeaderValue')
can be provided.
NOTE:
SE2 : The HTTP request will be sent by javascript AJAX.
Fields: [ ]=
Optional with Default Value
-
URL
The URL to request.
-
BenchContent
The bench content to be compared with the response sent back from the server.
- [ Timeout = ]
The timeout (in seconds) waiting for the response from HTTP server. The default value is 120 seconds.
- [ HeaderName = ]
The HTTP request header name.
- [ HeaderValue = ]
The value to set for the HTTP request header.
Examples:
-
C, VerifyURLContent, "http://rest.api.url", "some expected response content", "60"
Send an HTTP "GET" request for url "http://rest.api.url",
and wait for response with timeout of 60 seconds,
and verify request's result from server with the content "some expected response content".
-
C, VerifyURLContent, "http://rest.api.url?var1=value&var2=value", "some expected response content"
Send an HTTP "GET" request for url "http://rest.api.url?var1=value&var2=value",
and wait for response with default timeout of 120 seconds,
and verify request's result from server with the content "some expected response content".
-
C, VerifyURLContent, "http://rest.api.url", "some expected response content", "60", "Accept", "text/*", "Accept-Charset", "UTF-8"
Send an HTTP "GET" request for url "http://rest.api.url" with headers ("Accept","text/*") and ("Accept-Charset","UTF-8"),
and wait for response with timeout of 60 seconds,
and verify request's result from server with the content "some expected response content".
[How To Read This Reference]
DDDriverCommands::VerifyURLToFile
Send an HTTP GET request, and verify the response with the content of a file.
NOTE:
The optional parameters 'HeaderName' and 'HeaderValue' must appear in pair,
and they can present more than 1 time, which means multiple pair of ('HeaderName', 'HeaderValue')
can be provided.
NOTE:
SE2 : The HTTP request will be sent by javascript AJAX.
Fields: [ ]=
Optional with Default Value
-
URL
The URL to request.
-
BenchFile
The name of the bench file holding the content to be compared with the response sent back from the server.
The bench file can be a full path, a relative path, or a file name.
For relative path, it is appended to the project's path to build the full path of the file.
For file name, the file is supposed under the project's bench directory (it is Datapool\Bench in SAFS or Benchmarks in SE+).
In any case the parent folder of the file must exist.
- [ Timeout = ]
The timeout (in seconds) waiting for the response from HTTP server. The default value is 120 seconds.
- [ HeaderName = ]
The HTTP request header name.
- [ HeaderValue = ]
The value to set for the HTTP request header.
Examples:
-
C, VerifyURLToFile, "http://rest.api.url", "reponse.txt"
Send an HTTP "GET" request for url "http://rest.api.url",
and wait for response with default timeout of 120 seconds,
and verify request's result from server with the content of file "reponse.txt" under project's bench directory.
-
C, VerifyURLToFile, "http://rest.api.url?var1=value&var2=value", "compare\reponse.txt"
Send an HTTP "GET" request for url "http://rest.api.url?var1=value&var2=value",
and wait for response with default timeout of 120 seconds,
and verify request's result from server with the content of file "reponse.txt" under project's compare directory.
the fodler 'compare' must already exist in the project.
-
C, VerifyURLToFile, "http://rest.api.url", "c:\test\compare\reponse.txt", "60", "Accept", "text/*", "Accept-Charset", "UTF-8"
Send an HTTP "GET" request for url "http://rest.api.url" with headers ("Accept","text/*") and ("Accept-Charset","UTF-8"),
and wait for response with timeout of 60 seconds,
and verify request's result from server with the content of file "c:\test\compare\reponse.txt".
[How To Read This Reference]
DDDriverCommands::Version
Specify the table format VERSION
Used to specify the VERSION of the table format.
This is currently not required since there is only one
current version of the table format--1.0.
DDDriverCommands::WaitForGUI
DRD |
RC |
RJ |
TID |
WR |
SE |
SE2 |
TC |
AUT |
Wait for a Window or Window Component to become valid.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window to wait for.
A reference from the AppMap for the Component within the Window to wait for.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
Examples:
-
C, WaitForGUI, AWindow, AWindow
Waits up to 30 seconds for AWindow to become valid.
-
C, WaitForGUI, AWindow, AWindow, 10
Waits up to 10 seconds for AWindow to become valid.
-
C, WaitForGUI, AWindow, AComponent, 10
Waits up to 10 seconds for AComponent within AWindow to become valid.
[How To Read This Reference]
DDDriverCommands::WaitForGUIGone
DRD |
RC |
RJ |
TID |
WR |
TC |
SE2 |
AUT |
Wait for a Window or Window Component to become invalid.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window to watch.
A reference from the AppMap for the Component within the Window to watch.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
Examples:
-
C, WaitForGUIGone, AWindow, AWindow
Waits up to 30 seconds for AWindow to become invalid.
-
C, WaitForGUIGone, AWindow, AWindow, 10
Waits up to 10 seconds for AWindow to become invalid.
-
C, WaitForGUIGone, AWindow, AComponent, 10
Waits up to 10 seconds for AComponent within AWindow to become invalid.
[How To Read This Reference]
DDDriverCommands::WaitForPropertyValue
Wait for a specific Window or Component property value to match an expected value.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window.
A reference from the AppMap for the Component within the Window.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
-
PropertyName
Case-sensitive name of the object property to watch.
-
ExpectedValue
Case-sensitive value of the object property to match.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
- [ CaseInsensitive = ]
Values of "CASE-INSENSITIVE", "CASEINSENSITIVE", and "FALSE" will cause the
comparison of the property value and the expected value to ignore case.
All engines may not support this parameter at this time.
Examples:
-
C, WaitForPropertyValue, AWindow, AWindow, "Visible", "True"
Waits up to 15 seconds for the "Visible" property of AWindow to contain "True".
-
C, WaitForPropertyValue, WebBrowser, BrowserDoc, "readyState", "Complete", 45
Waits up to 45 seconds for the "readyState" property of BrowserDoc to contain "Complete".
-
C, WaitForPropertyValue, AWindow, AWindow, visible, "True", 5, "CASEINSENSITIVE"
Wait for the "visible" property of AWindow to have the value "True".
Wait for the "visible" property of AWindow to have the value "True" and ignore case when
making the comparison. The attempt will timeout in 5 seconds.
-
C, WaitForPropertyValue, AWindow, AWindow, visible, True, , "FALSE"
Wait for the "visible" property of AWindow to have the value "True".
Wait for the "visible" property of AWindow to have the value "True" and ignore case when
making the comparison. The command will use the default timeout value.
[How To Read This Reference]
DDDriverCommands::WaitForPropertyValueGone
Wait for a specific Window or Component property value to change from a known value.
Fields: [ ]=
Optional with Default Value
-
WindowID
A Window reference from the AppMap
-
ComponentID
A reference from the AppMap for the Component within the Window.
A reference from the AppMap for the Component within the Window.
If the Window is the item of interest then both the WindowID and
ComponentID will be the same.
-
PropertyName
Case-sensitive name of the object property to watch.
-
ExpectedValue
Case-sensitive known value of the property to change to something else.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
- [ CaseInsensitive = ]
Values of "CASE-INSENSITIVE", "CASEINSENSITIVE", and "FALSE" will cause the
comparison of the property value and the expected value to ignore case.
All engines may not support this parameter at this time.
Examples:
-
C, WaitForPropertyValueGone, AWindow, AWindow, "Visible", "False"
Waits up to 15 seconds for the "Visible" property of AWindow to change from "False".
-
C, WaitForPropertyValueGone, WebBrowser, BrowserDoc, "readyState", "Loading", 45
Waits up to 45 seconds for the "readyState" property of BrowserDoc to change from "Loading".
-
C, WaitForPropertyValueGone, AWindow, AWindow, visible, "True", 5, "CASEINSENSITIVE"
Wait for the "visible" property of AWindow to change from "True".
Wait for the "visible" property of AWindow to change from "True" to anything else
and ignore case when making the comparison. The attempt will timeout in 5 seconds.
-
C, WaitForPropertyValueGone, AWindow, AWindow, visible, True, , "FALSE"
Wait for the "visible" property of AWindow to change from "True".
Wait for the "visible" property of AWindow to change from "True" to anything else
and ignore case when making the comparison. The command will use the default timeout value.
[How To Read This Reference]
DDDriverCommands::WaitForRegistryKeyExists
Wait for a Registry Key to become valid.
On Windows XP (and higher?) this is accomplished via
the REG.EXE provided by the operating system. If this program is NOT available
then the Registry commands will not work until another means is implemented--possibly
Windows Scripting Host scripts, etc..
Fields: [ ]=
Optional with Default Value
-
Key
The Registry Key name to seek.
- [ KeyValue = ]
The value name under the parent key to seek.
The value name under the parent key. If not provided then we just
check to see if the provided parent key exists.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
Examples:
-
C, WaitForRegistryKeyExists, "HKLM\Software\Rational Software\Rational Test\8", "Install Directory", 5
Waits up to 5 seconds for the Install Directory value key to exist.
-
C, WaitForRegistryKeyExists, "HKLM\Software\Rational Software\Rational Test\8", "", 0
Checks only once (0 timeout) to see if the provided key exists.
-
C, WaitForRegistryKeyExists, "HKLM\Software\Rational Software\Rational Test\8"
Loops for up to the default 15 seconds for the provided key to exist.
[How To Read This Reference]
DDDriverCommands::WaitForRegistryKeyValue
Wait for a specific Registry KeyValue to match an expected value.
On Windows XP (and higher?) this is accomplished via
the REG.EXE provided by the operating system. If this program is NOT available
then the Registry commands will not work until another means is implemented--possibly
Windows Scripting Host scripts, etc..
Fields: [ ]=
Optional with Default Value
-
Key
The Registry Key name to seek
-
KeyValue
The value name under the parent key to seek.
The value name under the parent key. If not provided then we just
check to see if the provided parent key exists.
-
ExpectedValue
Case-sensitive value to match with the key value.
- [ Timeout = 15 ]
Timeout value in seconds before exiting automatically.
- [ CaseInsensitive = ]
Values of "CASE-INSENSITIVE", "CASEINSENSITIVE", and "FALSE" will cause the
comparison of the key value and the expected value to ignore case.
All engines may not support this parameter at this time.
Examples:
-
C, WaitForRegistryKeyValue, "HKLM\Software\Adobe\CommonFiles", "UsageCount", "0x1"
Waits up to 15 seconds for the UsageCount key value to contain "0x1".
The comparison IS case-sensitive
-
C, WaitForRegistryKeyValue, "HKLM\Software\Adobe\CommonFiles", "UsageCount", "0x1", 45
Waits up to 45 seconds for the UsageCount key value to contain "0x1".
The comparison IS case-sensitive
-
C, WaitForRegistryKeyValue, "HKLM\Software\Adobe\CommonFiles", "UsageCount", "0X1", 5, CASEINSENSITIVE
Waits up to 5 seconds for the UsageCount key value to contain "0x1".
The comparison IS NOT case-sensitive
-
C, WaitForRegistryKeyValue, "HKLM\Software\Adobe\CommonFiles", "UsageCount", "0X1", "", FALSE
Waits up to 15 seconds for the UsageCount key value to contain "0x1".
The comparison IS NOT case-sensitive
[How To Read This Reference]
DDDriverCommands::WaitForWebPage
Wait for a web document to finish loading within a timeout period.
Fields: [ ]=
Optional with Default Value
- [ WindowID = ]
A Window reference from the AppMap
If ComponentID is provided then providing WindowID is REQUIRED.
- [ ComponentID = ]
A reference from the AppMap for the Frame/HTMLDocument within WindowID to wait for.
If this parameter is provided then providing WindowID is REQUIRED.
- [ Timeout = 30 ]
Timeout value in seconds before exiting automatically.
Examples:
-
C, WaitForWebPage
Waits up to 30 seconds for the topmost web page to finish loading.
-
C, WaitForWebPage, "", "", 60
Waits up to 60 seconds for the topmost web page to finish loading.
-
C, WaitForWebPage, MainWebApp, TOCFrameDoc, 20
Waits up to 20 seconds for the TOCFrameDoc web page to finish loading.
[How To Read This Reference]