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.
Ant vs. controller
When I run a script directly via the controller versus via an ant script I get different results!
Does the controller modify the table numbers, column numbers etc. ?
The scenario is that I am iterating over a table looking for a item with a particular value.
The code is
Does the controller modify the table numbers, column numbers etc. ?
The scenario is that I am iterating over a table looking for a item with a particular value.
The code is
while(_condition( _row(_table(10), $i) != null))
{
_log('checking row with name ' + _table(10).rows[$i].cells[3].childNodes[1].value, 'success');
if ( _condition(_table(10).rows[$i].cells[3].childNodes[1].value == $name))
{
_log("found contractor " + $name, 'success');
_click(_table(10).rows[$i].cells[2].childNodes[1]);
_assertEqual("Delete successful", getSuccess());
return;
}
$i++;
}
the results from the controller is:_sahi.saveCondition( _row(_table(10), 4) != null);
checking row with name carmanSRC
_log('checking row with name ' + _table(10).rows[4].cells[3].childNodes[1].value, 'success');
_sahi.saveCondition(_table(10).rows[4].cells[3].childNodes[1].value == "carmanSRC");
found contractor carmanSRC
_log("found contractor " + "carmanSRC", 'success');
the results from the ant is:_sahi.saveCondition( _row(_table(10), 4) != null);
checking row with name undefined
_log('checking row with name ' + _table(10).rows[4].cells[3].childNodes[1].value, 'success');
_sahi.saveCondition(_table(10).rows[4].cells[3].childNodes[1].value == "carmanSRC");
_sahi.saveCondition( _row(_table(10), 5) != null);
So it appears to be iterating over the rows correctly but the logical test is failing when I run it via ant - any ideas?
Comments
The ant script was spawning an instance of IE to run the test, whereas the controller was in Mozilla. If I get ant to use Mozilla it all works fine.
Does anyone know why IE and Mozilla are getting different results?