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.
close annoying IE warning "do you want to close this window?"
I have a code to close popup:
_popup("title").close();
then the warning message pop-up comes up and needs to be destroyed. please help.
"The webpage you are viewing is trying to close this window"
I need to automate the click "yes" or get rid of the warning.
_popup("title").close();
then the warning message pop-up comes up and needs to be destroyed. please help.
"The webpage you are viewing is trying to close this window"
I need to automate the click "yes" or get rid of the warning.
Comments
Could you try:
_popup("title")._closeWindow();
If you still get that error, can you tell us what browser/OS you are using? (If you could copy the contents on the Info tab of the controller, that will help)
Regards,
Narayan
I did try that code, but no luck. The window still opens with the message. I've also tried IE options in the security settings. Here's my Info tab:
Sahi
Version : V3
Build : 2010-04-30
Check for updates
Browser
UserAgent : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Name : Microsoft Internet Explorer
Version : 4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Native XmlHTTPRequest : true
Is Java enabled : true
Is cookie enabled : true
Operating System
Name : Windows XP
Version : 5.1
Architecture : x86
Is process list available : true
Java
Java Installed Directory : C:\Program Files\Java\jre6
JRE Version : 1.6.0_15
Is keytool available : true
Is the solution to above problem available with Sahi Pro?
I want to automate that warning in IE10. Is it possible to select the desired option from Yes or No?
Scenario is like this.
When I launch IE10 and go to http://www.sahi.co.in/demo/ page, there is a button Close Self.
I get message below
Windows Internet Explorer
The webpage you are viewing is trying to close the window.
Do you want to close this window?
Yes No
How can I choose whether I select Yes or I select No?
Thanks
You can you native Key events to simulate an ENTER key press event (to select yes or no) or to simulate a TAB key press event (to toggle between yes and no).
An illustration of how to use native key event can be seen as an example(of file upload) on the following link. Have a look at it and try it out as per your requirement. Let me know if you face any problems with this.
Regards.