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.
Data driven test problem
I wrote a simple data driven script, the problem is the data is getting repeated. For example:
_setValue(_password("newPass"), "T!est123456");
_setValue(_password("confPass"), "T!est123456");
_wait(1000);
_setValue(_textbox("phoneOffice"), "T!est123456");
_setValue(_textbox("phoneMobile"), "7451234447");
--
In the example above, PhoneOffice's value should be "7451234447". So I am not sure why it picks up the password value again...
Here is what my for loop looks like:
var $data = _readCSVFile("C:\\Users\\testme\\SahiPro\\userdata\\scripts\\test_sahi2.csv");
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addUser($row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7],$row[8],$row[9],$row[10]);
}
_setValue(_password("newPass"), "T!est123456");
_setValue(_password("confPass"), "T!est123456");
_wait(1000);
_setValue(_textbox("phoneOffice"), "T!est123456");
_setValue(_textbox("phoneMobile"), "7451234447");
--
In the example above, PhoneOffice's value should be "7451234447". So I am not sure why it picks up the password value again...
Here is what my for loop looks like:
var $data = _readCSVFile("C:\\Users\\testme\\SahiPro\\userdata\\scripts\\test_sahi2.csv");
for (var $i=0; $i<$data.length; $i++){
var $row = $data[$i];
addUser($row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7],$row[8],$row[9],$row[10]);
}