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.
Modal dialogs
Any luck with handling Modal Dialog Boxes???
Would like to have some insight on handling modal dialog boxes
with sahi...
The Function code that generates the modal dialog box is as below:-
function putComments()
{
var val="";
// it does not allow to close the window until comment
is entered
while(val=="" || val==null)
{
if (window.showModalDialog){
val=showModalDialog("comments.jsp",window,"dialogHeight: 230px;
dialogWidth: 370px; dialogTop: 200px; dialogLeft: 304px; edge:
Sunken;
center: Yes; help: No; resizable: Yes; status: No;");
}else{
val= "Due to browser restriction we
can not take the comment."
}
}
document.forms[0].txtComment.value=val;
}
I have a Button which calls a submit function which in turn results in an OK-Cancel popup. As soon as the user clicks on Ok, the modal dialog shows up where the user has to type in some comments and click on save. This in turn initiates a simple OK popup. I need to attach to this modal dialog and perform the required actions as well as handle all the popups on the way...
-Betsy Joy.
Would like to have some insight on handling modal dialog boxes
with sahi...
The Function code that generates the modal dialog box is as below:-
function putComments()
{
var val="";
// it does not allow to close the window until comment
is entered
while(val=="" || val==null)
{
if (window.showModalDialog){
val=showModalDialog("comments.jsp",window,"dialogHeight: 230px;
dialogWidth: 370px; dialogTop: 200px; dialogLeft: 304px; edge:
Sunken;
center: Yes; help: No; resizable: Yes; status: No;");
}else{
val= "Due to browser restriction we
can not take the comment."
}
}
document.forms[0].txtComment.value=val;
}
I have a Button which calls a submit function which in turn results in an OK-Cancel popup. As soon as the user clicks on Ok, the modal dialog shows up where the user has to type in some comments and click on save. This in turn initiates a simple OK popup. I need to attach to this modal dialog and perform the required actions as well as handle all the popups on the way...
-Betsy Joy.
Comments
Sahi works with modal dialogs. Can you please specify the problem you are facing?
Regards,
Narayan
My issue with the Script I recorded is that it works fine with Internet Explorer but when the same script is executed on Mozilla Firefox, a popup which says "Unresponsive Script" comes up on a click action. Also a message "Firefox prevented this site from opening 9616 pop-up windows" comes up. The number of pop-ups varies each time the script is executed.
Thanks,
Betsy Joy.
Thanks,
Narayan
1) Screenshot of Exception
2) Script being used
3) Source code for page
4) Screen-shot of the page
Thanks,
-Betsy Joy
Thanks for the patience. It will take a bit more time though. Give us a day more please.
Regards,
Narayan