We designed these play.cmd & record.cmd so that you may do record & playback from external tools, such as vscode or notepad++.
We did even more. All metadata related to tests and internal Rapise functions is stored explicitly in .json format. Let's go over places where this information is stored. For given test, for global objects and for ActiveX types.
1. All global objects are explained in <rapise setup>\Engine\Metadata\GlobalObjects\*.metadata. So when someone types "Global.", code helper first checks for ....GlobalObjects\Global.metadata
2. Code helper tracks object type and SeS("myObj") function. So if you have one of these statements:
var myObj = SeS('myObj');
myObj.*
or
SeS('myObj').*
Where '*' depicts the place where one is currently typing and where code completion is to appear.
In such cases there is a way how to find object type information. Find 'Memory_clear' in the Objects.js. It is actually a JSON file, but in JS format. Only difference is presence is variable declaration:
var saved_script_objects = {.....
so if you trim everything before to 1st '{' then you will get pure JSON. Here you should be able to find an object definition and take it's object_type, i.e.:
"Memory_clear": {
...
"object_type": "ManagedObject",
"object_flavor": "Managed",
...
},
Here is how we may use this information:
1. object_type should have matching entry in
<rapise setup>\Engine\Metadata\AllLibraries.metadata.
It should contain definition for 'ManagedObject':
{
...
"ManagedObject": {
"actions": [
...
],
"properties": [
{
...
}
],
"extend_rule": <parent type ID>.
...
}
Usually there is "extend_rule" for most of the rules. In this case the object will also contain all methods from the extended object type. So code helper should merge these definitions.
2. The value of "object_flavor" helps to find matching icon in the <rapise setup>\Engine\ObjectImages\<object_type>.png
3. For ActiveX objects the type may be defined in either way:
var fso = WScript.CreateObject('Scripting.FileSystemObject');
or
var fso = new ActiveXObject('Scripting.FileSystemObject');
Also type may be specified when assigning a variable or when declaring a parameter as follows:
var fso = /**Scripting.FileSystemObject*/GetFso();
or
function CreateFile(/**Scripting.FileSystemObject*/fso, /**string*/fname)
{
fso.*
}
These types are defined in .xml files <rapise setup>\Engine\AutoCompletion\*.xml