IE "The webpage you are viewing is trying to close the windo

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
tonyg
Posts: 1
Joined: Thu May 26, 2011 7:54 pm

IE "The webpage you are viewing is trying to close the windo

Post by tonyg » Thu May 26, 2011 8:23 pm

I have a website that when 'Sign Out' is clicked, a IE window pops up with the message "The webpage you are viewing is trying to close the window. Do you want to close this window?"

I've tried recording and running the script but the script doesn't 'click' on Yes to close the window. Is there a function or command in iMacros that will close this window? This is not a web popup. It's a message created by IE.
Tom, Tech Support
Posts: 3513
Joined: Mon May 31, 2010 4:59 pm

Re: IE "The webpage you are viewing is trying to close the w

Post by Tom, Tech Support » Mon May 30, 2011 6:39 pm

Hi Tony,

What did iMacros record for this page? Would you post your macro here please?
Regards,

Tom, iMacros Support
sacobg
Posts: 2
Joined: Sat Sep 24, 2011 5:29 pm

Re: IE "The webpage you are viewing is trying to close the w

Post by sacobg » Sat Sep 24, 2011 7:09 pm

I couldnt find any other topic about this problem or the solution. I'v got the same thing happening. Cant stop this dialog box from appearing.

Image

What actually happens is after a click on a button second tabs opens up for input of login details. After submit the second tab closes itself resulting in this awful dialog box to pop up. iMacros actually doesnt record anything for the click on "Yes" on the dialog box (I tried all click modes) It is a browser dialog and probably this is why all ONDIALOG and all others of this kind didnt work as well. Is there any workaround at all? Btw I'm using iMacros Pro Version 7.40.1598 on Windows 7 64 bit I have searched for an answer everywhere. Same thing happen with iMacros add on for interent explorer and with the firefox extension 7.4.0.1 on firefox 6.02
Tom, Tech Support
Posts: 3513
Joined: Mon May 31, 2010 4:59 pm

Re: IE "The webpage you are viewing is trying to close the w

Post by Tom, Tech Support » Mon Oct 31, 2011 1:13 pm

iMacros 7 should handle this dialog. Just make sure you have an ONDIALOG POS=1 BUTTON=YES command in your macro before the command which causes this dialog to appear.
Regards,

Tom, iMacros Support
sandro.samueli
Posts: 1
Joined: Wed Mar 28, 2012 4:09 pm

Re: IE "The webpage you are viewing is trying to close the w

Post by sandro.samueli » Wed Mar 28, 2012 4:21 pm

The ONDIALOG statement don't work! Please, I need a solution ... I'm considering buying the enterprise version, but if it dont' works... :(
tomng3771
Posts: 1
Joined: Fri Apr 27, 2012 6:44 pm

Re: IE "The webpage you are viewing is trying to close the w

Post by tomng3771 » Tue May 29, 2012 10:44 pm

I recorded a printing procedure to print a receipt from a second tab (the print dialog popped up from the second tab and the second tab is linked from the first tab), when the print dialog appeared, I clicked on Print button from the Print – iMacros dialog with Use default printer during replay option.

Then I’ve received the error: “ Please make your input here: the webpage you are viewing is trying to close the window...”. I clicked on the OK in the JS Dialog - iMacros dialog box. Then imacros crashed.
It displayed: An application error occurred. Please sent the error log file C:\...\CrashReport.txt to support@iopus.com. I 've sent to support@ipopus.com but I 've received the returned email address error. So I have to post the problem here.

Below is the content of the CrashReport.txt file:

2012-05-29 21:43:03Z
iMacros version 8.0.1.1895, OS version Microsoft Windows NT 6.1.7601 Service Pack 1

Exception at Int32 get_IEDocumentMode()
Object reference not set to an instance of an object.
at iMacros.Core.Helpers.IEUtils.get_IEDocumentMode()
at iMacros.Core.Helpers.HtmlDocumentHelper.FireEvent(IHTMLElement element, String eventType, Boolean forceOldMethod)
at iMacros.Core.Logic.MacroRecorder.#=qiW2LI616w$OPKrySAfa1Tg7_bG9BDqSyt3UF5WCVKV8=()
at iMacros.Core.Logic.MacroRecorder.#=qXgyk9RSF45v3WpZ0wharSPowbI9yr6Es7VswNcbzrw4=(WebBrowserClass #=qF_Duw95$CDzermqB1iUMcg==, RecordClickMode #=qk$lBWMgbvXMoQ2cjAkwydeUwEGpdo8ZcrRz6UDV8DJY=)
at iMacros.Core.Logic.MacroRecorder.#=qErfu$VEtOIJBGk3oFuFg6wiKNPpuSXnHKoV$LYu3_$dziZxfZM3ahkaRGcdVqeea(Object #=qcfa52TfsRp4Jnlw_C_U1RA==, NewBrowserAttachedEventArgs #=q3R8tG4zpuC5DRPWDgAdnEA==)
at iMacros.Core.Logic.MacroManager.OnNewBrowserAttached(WebBrowserClass oldWebBrowser, IntPtr oldWebBrowserHwnd, WebBrowserClass newWebBrowser, IntPtr newWebBrowserHwnd)
at iMacros.Core.Logic.MacroManager.set_WebBrowser(WebBrowserClass value)
at iMacros.TabbedBrowser.WinUI.TabBrowserControl.#=qPxLCVpWKazFXFonJyCvWbQ==(TabPage #=qSJp0FUiR7c4zDSTuABl$MQ==, Boolean #=qpx$VoTVQJbzeGOke0w$6Cg==)
at iMacros.TabbedBrowser.WinUI.TabBrowserControl.#=qOipVpvm4eARdNXVUIP$JkoO2uZXmeTRdyeIDgx4LF6c=(Object #=q4qOk$e5Ios_AHRFG_aYMBg==, EventArgs #=q0IAOt5BXHKKuSXBLtLchDQ==)
at iMacros.TabbedBrowser.WinUI.CustomWebBrowser.OnQuit()
at iMacros.TabbedBrowser.WinUI.CustomWebBrowser.WndProc(Message& message)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

========================================
2012-05-29 21:51:38Z
iMacros version 8.0.1.1895, OS version Microsoft Windows NT 6.1.7601 Service Pack 1

Exception at Int32 get_IEDocumentMode()
Object reference not set to an instance of an object.
at iMacros.Core.Helpers.IEUtils.get_IEDocumentMode()
at iMacros.Core.Helpers.HtmlDocumentHelper.FireEvent(IHTMLElement element, String eventType, Boolean forceOldMethod)
at iMacros.Core.Logic.MacroRecorder.#=qiW2LI616w$OPKrySAfa1Tg7_bG9BDqSyt3UF5WCVKV8=()
at iMacros.Core.Logic.MacroRecorder.#=qXgyk9RSF45v3WpZ0wharSPowbI9yr6Es7VswNcbzrw4=(WebBrowserClass #=qF_Duw95$CDzermqB1iUMcg==, RecordClickMode #=qk$lBWMgbvXMoQ2cjAkwydeUwEGpdo8ZcrRz6UDV8DJY=)
at iMacros.Core.Logic.MacroRecorder.#=qErfu$VEtOIJBGk3oFuFg6wiKNPpuSXnHKoV$LYu3_$dziZxfZM3ahkaRGcdVqeea(Object #=qcfa52TfsRp4Jnlw_C_U1RA==, NewBrowserAttachedEventArgs #=q3R8tG4zpuC5DRPWDgAdnEA==)
at iMacros.Core.Logic.MacroManager.OnNewBrowserAttached(WebBrowserClass oldWebBrowser, IntPtr oldWebBrowserHwnd, WebBrowserClass newWebBrowser, IntPtr newWebBrowserHwnd)
at iMacros.Core.Logic.MacroManager.set_WebBrowser(WebBrowserClass value)
at iMacros.TabbedBrowser.WinUI.TabBrowserControl.#=qPxLCVpWKazFXFonJyCvWbQ==(TabPage #=qSJp0FUiR7c4zDSTuABl$MQ==, Boolean #=qpx$VoTVQJbzeGOke0w$6Cg==)
at iMacros.TabbedBrowser.WinUI.TabBrowserControl.#=qOipVpvm4eARdNXVUIP$JkoO2uZXmeTRdyeIDgx4LF6c=(Object #=q4qOk$e5Ios_AHRFG_aYMBg==, EventArgs #=q0IAOt5BXHKKuSXBLtLchDQ==)
at iMacros.TabbedBrowser.WinUI.CustomWebBrowser.OnQuit()
at iMacros.TabbedBrowser.WinUI.CustomWebBrowser.WndProc(Message& message)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thank you for your help.
Post Reply