18 January 2026:


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.

Getting `"$myVar" is not defined` error in the second `CreateKeyword`

I created 3 keywords in a .d.csv file with Sahi Editor, however the 2nd keyword failed because the `"$myVar" is not defined` error, while the 1st and 3rd ones were working without any problem.
All my 3 keywords are almost just the same, the only difference is the number of parameters. To test this, you can try with this simple example:
1. Create a `testlib.sah` with only one simple function:

function sum() {
var $result = 0;
for (var $i=0; $i<arguments.length; $i++) {
$result += arguments[$i];
}
return $result;
}

2. Create a `test.dd.csv` or `test.xls` file and use `loadSahi` to load the above `testlib.sah`.
3. Create at least 3 keywords with [CreateKeyword] and carries at least one argument.
4. Create at least 1 testcase for each keyword.
5. Playback with the `test.dd.csv` or `test.xls`.
Sign In or Register to comment.