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.
var srctext = _image("SAVE CHANGES").src; why can't I
if
_log(_image("SAVE CHANGES").src); Show the source path of the image
why can't I set it to a variable
var srctext = _image("save").src;
I get error TypeError: _sahi._image("SAVE CHANGES") is null
but the log function is proving both that the _image() is not null, and that _image().src returns something.
_log(_image("SAVE CHANGES").src); Show the source path of the image
why can't I set it to a variable
var srctext = _image("save").src;
I get error TypeError: _sahi._image("SAVE CHANGES") is null
but the log function is proving both that the _image() is not null, and that _image().src returns something.
Comments
example:
var $srctext = _image("save").src;
var variablename
and
var $Variablename
I have seen and used both methods of syntax so far in sahi
But in this case
var srctext = _image("SAVE CHANGES").src; <--- will just error out
var $srctext = _image("SAVE CHANGES").src; <---will set $srctext to null
neither of which gets me to the actual text of the source of the image
But like I said the _log(_image("SAVE CHANGES").src); will correctly show the text of the image src=""
var $srctext = "";
_set($srctext, _image("SAVE CHANGES").src);