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.
set and popup commands
Hi,
I'm trying to navigate a table from a popup window so I tried this:
var $totalRows=0;
var $curRow=0;
// This works
_popup("SELECTOR")._alert(_table(8).rows.length);
// Frist try, but this wont work
//$totalRows=_popup("SELECTOR")._table(8).rows.length;
// Second try, but it doesn't work
//_popup("SELECTOR")._set($totalRows,_table(8).rows.length);
// Third one don't work either
//_set($totalRows,_popup("SELECTOR")._table(8).rows.length);
for($curRow=1;$curRow<=$totalRows;$curRow++) {
...
}
The error message while uncommenting second try is
_popup("SELECTOR")._set(0,_table(8).rows.length); SahiNotMyWindowException: SahiNotMyWindowException
No trace available
And when uncommenting third:
_sahi.handleSet('\$totalRows' + 21, _popup("SELECTOR")._table(8).rows.length); SyntaxError: missing ) after argument list
():0
I'm using Release 20080305 (same results on 20071021)
Any ideas?
Best regards.
I'm trying to navigate a table from a popup window so I tried this:
var $totalRows=0;
var $curRow=0;
// This works
_popup("SELECTOR")._alert(_table(8).rows.length);
// Frist try, but this wont work
//$totalRows=_popup("SELECTOR")._table(8).rows.length;
// Second try, but it doesn't work
//_popup("SELECTOR")._set($totalRows,_table(8).rows.length);
// Third one don't work either
//_set($totalRows,_popup("SELECTOR")._table(8).rows.length);
for($curRow=1;$curRow<=$totalRows;$curRow++) {
...
}
The error message while uncommenting second try is
_popup("SELECTOR")._set(0,_table(8).rows.length); SahiNotMyWindowException: SahiNotMyWindowException
No trace available
And when uncommenting third:
_sahi.handleSet('\$totalRows' + 21, _popup("SELECTOR")._table(8).rows.length); SyntaxError: missing ) after argument list
():0
I'm using Release 20080305 (same results on 20071021)
Any ideas?
Best regards.
Comments
I'm using Release 20080305
Starting script
_setValue(_textbox("IUserName"), "username");
_setValue(_password("IPassword"), "password");
_click(_imageSubmitButton("login"));
_click(_image(22));
_click(_image(2222));
_click(_imageSubmitButton("Add to Cart"));
_click(_imageSubmitButton("Check Out"));
_click(_imageSubmitButton("Create Document"));
_click(_imageSubmitButton("Proceed to Place Order"));
_setValue(_textbox("tPONumber"), "sahi PO");
_click(_link("Add New"));
_popup("Add_Ship_Contact")._setValue(_textbox("txtContactName"), "Sahi User "); SahiNotMyWindowException: SahiNotMyWindowException
No trace available