How to make use of gs.sleep() in a scoped application scripts


Description

A scoped application doesn't honor direct use of "gs.slppe()" function in "Application scope" scripts.

Release or Environment

All Versions

Instructions

The "gs.sleep()" function can't be used in scoped application scripts, as this falls under the global scope. But to make use of this function follow the below process.


         Example:

var SleepForScoppedApp = Class.create();
SleepForScoppedApp.prototype = {
    initialize: function() {},
    sleep: function(time) {
        gs.sleep(time);
    },
    type: 'SleepForScoppedApp'
};

Additional Information

Kindly refer to the following community article.

Using gs.sleep in a scoped application