RunSettings

You can use the RunSettings class to modify the runtime settings, including API calls and timeouts, slow motion mode (increasing the interval between API calls), etc.

how to set RunSettings

  1. Drag and drop from the toolbox "Common" -> "Run Settings" to the code to configure generation;
  2. Reference the RunSettings in the leanpro.common library in the script to set;

Option introduction

The current run setting RunSettings provides the following setting items:

JavaScript
Python
export class RunSettings {
    static defaultTimeout: number; //in milliseconds, default to 5000
    static slowMo: number;  //slow motion duration in milliseconds, default is 0, which means turned off
    static reportSteps: boolean; 
}
class RunSettings():
	defaultTimeout: int
	slowMo: int
	def set(options: TypedDict) -> None

defaultTimeout

The timeout period when calling the desktop automation method provided by CukeTest, in milliseconds (ms), the default timeout period is 5000 milliseconds, that is, 5 seconds. During the timeout period, the call will be tried repeatedly until it succeeds or times out. The calling method is as follows:

JavaScript
const { RunSettings } = require('leanpro.common'); // Reference the leanpro.common library at the top
//...
RunSettings.set({
    defaultTimeout: 10000
})

slowMo

The interval time when calling the desktop automation method provided by CukeTest, the unit is milliseconds (ms), and the default is 0. Specifies the minimum time between automation action method calls, used to slow down automation for debugging or observing behavior. The calling method is as follows:

JavaScript
const { RunSettings } = require('leanpro.common'); // Reference the leanpro.common library at the top
//...
RunSettings.set({
    slowMo: 2000
})

report-steps

Output report information for each automation action (such as click, input, scroll, start application and end application, etc.) in the output panel. The default is false which means disabled. The way to enable it is as follows:

JavaScript
const { RunSettings } = require('leanpro.common'); // Reference the leanpro.common library at the top
//...
RunSettings.set({
    reportSteps: true
})

results matching ""

    No results matching ""