18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Problem on setting global
globalworming
Moderators
In this testscript, the logName function is not saved in the global:
Is there an easy workaround for this issue?
Regards
Wormi
function $anObject($name) {
var $this=this;
$this.name=$name
}
$anObject.prototype.logName = function(){
$this=this;
_log($this.name);
}
var $instance = new $anObject("instance of anObject");
//works
$instance.logName();
_setGlobal("instance", $instance);
var $globalInstance = _getGlobal("instance");
//does not work
$globalInstance.logName();
Is there an easy workaround for this issue?
Regards
Wormi