Multiple Recordings¶
Purpose¶
Every time you record, the script recorder updates your test script. Be cautious about what changes you make to the test script; some changes could be lost if the recorder is re-run (see Usage).
Usage¶
The test script path can be found in the title of Rapise window. Unless you specify otherwise, the test script is named Main.js
.
Note that the Script Recorder only has knowledge of four functions and two data structures:
- function
Test()
- function
TestInit()
- function
TestFinish()
- function
TestPrepare()
- array
g_load_libraries
- map
saved_script_objects
You can make changes to the body of any of the above functions, and you can alter the initialization of g_load_libraries
and saved_script_objects
. All other changes are unsafe.
During Recording, the Script Recorder:
- Appends newly recorded actions to the
Test()
function - Appends newly encountered objects to the
saved_script_objects
array - Updates
g_load_libraries
to reflect the library selections you made in the Select an Application to Record... Dialog - Ignores (and leaves intact) the definitions of
TestInit()
,TestFinish()
, andTestPrepare()
For example, suppose that you have the following code inside your script file:
//External comment // UNSAFE: will be removed by recorder
/*Another comment*/ // UNSAFE
var external_var; // UNSAFE
function Test()
{
//comment --SAFE
var external_var; //SAFE: defines a local variable for function “Test”
global_var=value; //SAFE: updates (or defines) a global variable
//SAFE everything inside this function will be kept intact after recording
}
The parts of code marked UNSAFE will be deleted by the script recorder.