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.
[sahi v1 -> v3 migration] package.name variables
Hi,
In sahi V1 I had a lot of constructions like example test.sah
In sahi V3 it stopped to work.
I tried different constructions like
$Categories.TEXT1 = "MyText";
OR
Categories.$TEXT1 = "MyText";
But I am getting FAILURES with message "$TEXT1" not found or "$Categories" not found
Lech
*************** library Categories.sah ********
function Categories()
{}
Categories.TEXT1 = "MyText";
******************************************
***************test.sah ********
_include("Categories.sah");
_setValue(_textbox("userID"), Categories.TEXT1);
******************************
In sahi V1 I had a lot of constructions like example test.sah
In sahi V3 it stopped to work.
I tried different constructions like
$Categories.TEXT1 = "MyText";
OR
Categories.$TEXT1 = "MyText";
But I am getting FAILURES with message "$TEXT1" not found or "$Categories" not found
Lech
*************** library Categories.sah ********
function Categories()
{}
Categories.TEXT1 = "MyText";
******************************************
***************test.sah ********
_include("Categories.sah");
_setValue(_textbox("userID"), Categories.TEXT1);
******************************
Comments
In sahi V1 you can use
TEXT = "ala";
_setValue(_textbox("userID"), TEXT);
In sahi V3 you must use
var $TEXT = "ala";
_setValue(_textbox("userID"), $TEXT);
Lech
You will have to make them $ variables.
Btw, if they are all constants, you may try
I would recommend you to move to $ though.
Regards,
Narayan
This looks like a bug in PACKAGE.VARIABLE evaluation. Can I report it to bug tracker?
Please compare positive and negative example.
********************* POSITIVE *************
function LIBRARY()
{}
LIBRARY.USER = "4000";
var $temp = LIBRARY.USER ;
_setValue(_textbox("login"), $temp);
********************* NEGATIVE*************
function LIBRARY()
{}
LIBRARY.USER = "4000";
_setValue(_textbox("login"), LIBRARY.USER);
*******************************************
Please also note, I cannot declare
$PACKAGE.VARIABLE = "scott"
because of JSERROR
ReferenceError: "$LIBRARY" is not defined.