Execute command - operation¶
This operation is only supported on HTML based platforms.
To perform this operation in the Suitest Test editor use the Execute command line:
await suitest.executeCommand("window.myApp.debugMode = 1");
Sometimes it is necessary to make certain preparations for the test scenario or augment the app to make it behave in a certain way. For example you may want to turn off pop-ups, set a specific location for your app, turn on the debug mode, etc.
var a = 1;
This code is creating a variable in the global scope. If the application happens to use such variable internally, this code may just have corrupted its runtime and thus the test results can not be considered reliable anymore.