These commands are generally for interrogating engines about the Windows and Components they can find. These are not normally used during testing. (But they can be used during testing like any other command record.)
For example, these commands are heavily used by STAFProcessContainer during test design time.
Each engine command has different parameters as described in its documentation. For reference, the first fields of ALL Engine Command test records are defined below:
Field #1 -- "E" = ENGINE COMMAND record type specifier.
Field #2 -- The Engine Command keyword.
Example:
E, GetTopLevelWindows
Engine Command parameters must be placed in the test record in the field position specified in the documentation. Some parameters are optional. However, the field associated with that parameter must be honored. If you wish to skip an optional parameter you must still provide an empty field for that parameter.
Example:
E, SomeCommand, Value1, Value2, , , Value5The above example shows two optional fields after Value2 which are given no value(skipped).
Engine commands that return a value do so in the SAFS/Hook/statusinfo variable of SAFSVARS which is populated via TestRecordData.statusinfo.
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
^TCAFS.UID.Count = [Number of UID References created last]
^TCAFS.UID.1 = [First UID Reference created]
^TCAFS.UID.n = [UID Reference number n]
The TestRecordData.statuscode is set to NO_SCRIPT_FAILURE if the engine supports and processes the command. This is true even if the command results in an empty, missing, or null return value.
SCRIPT_NOT_EXECUTED should be returned in TestRecordData.statuscode if the engine does not support the command.
Note that the full availablility of all Engine Commands may be spread across several files. Together, all of these files define all the Engine Commands available to the core framework.
| ClearReferenceCache |
|
Clear the Object reference cache used in a remote engine. | |
| GetCurrentWindow |
|
Return a reference to the top-most active (Window) with focus. | |
| GetTopLevelCount |
|
Get the number of visible top-level items (Windows?) for the engine. | |
| GetTopLevelWindows |
|
Return references to all known top-level items (Windows). | |
| IsEnabled |
|
Is the component Enabled (vs. disabled)? | |
| IsShowing |
|
Is the component visible? | |
| IsTopLevelPopupContainer |
|
Is the component a top-level Popup Container? | |
| IsValid |
|
Does the component still exist as a valid object? | |
| SetActiveWindow |
|
Make the component the active (topmost?) Window or Component. |
| TC |
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
^TCAFS.UID.Count = [Number of UID References created last]
^TCAFS.UID.1 = [First UID Reference created]
Example 1: "Ref1" Example 2: ""
Example 2 shows no top-level item was visible to the engine.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
| TC |
The engine's array of objects will be returned as a delimited list of fields. The first character in the String will identify the separator used between each reference. If no top level windows were found then the engine will return an empty string.
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.UID.Count = [Number of UID References created last]
^TCAFS.UID.1 = [First UID Reference created]
^TCAFS.UID.n = [UID Reference number n]
Example 1: ",Ref1,Ref2,Ref3" Example 2: ""
The first character in Example 1 (a comma in this case) signifies that the list of references will be separated by commas. The references then follow.
Example 2 shows no top-level items are visible to the engine.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.
| TC |
The Android Engine also persists these values as SAFS variables.
^DroidEngine.Command = [command]
^DroidEngine.StatusCode = [statuscode string]
^DroidEngine.StatusInfo = [statusinfo]
See DEngineCommandProcessor.setStatusVars().
The TestComplete Engine (TCAFS) also persists these values as SAFS variables.
^TCAFS.Command = [command]
^TCAFS.StatusCode = [statuscode string]
^TCAFS.StatusInfo = [statusinfo]
^TCAFS.FullName = [object.FullName] -- the TestObjects.FullName string--if command returns only 1 reference.