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.
How to change _popup(popWinName) prefix?
Hi All,
To perform actions on any popup window, I use _selectWindow(popupWinName) API.
Once this API gets executed, following commands gets executed with prefix _popup(popupWinName).
Sometimes, I got 502 and 404 errors, that time popup name becomes, "Error 502" or "Error 404". I try to handle this using try-catch method in this way:
_selectWindow(popupWinName);
try
{
_closeWindow();
}
catch(e)
{
_popup("Error 502")._selectWindow();
_popup("Error 502").close();
}
but in the catch section, code line gets executed as, _popup(popupWinName)._popup("Error 502")._selectWindow();
and hence, fails the execution.
How can I handle this situation?
regards,
nagar
To perform actions on any popup window, I use _selectWindow(popupWinName) API.
Once this API gets executed, following commands gets executed with prefix _popup(popupWinName).
Sometimes, I got 502 and 404 errors, that time popup name becomes, "Error 502" or "Error 404". I try to handle this using try-catch method in this way:
_selectWindow(popupWinName);
try
{
_closeWindow();
}
catch(e)
{
_popup("Error 502")._selectWindow();
_popup("Error 502").close();
}
but in the catch section, code line gets executed as, _popup(popupWinName)._popup("Error 502")._selectWindow();
and hence, fails the execution.
How can I handle this situation?
regards,
nagar