Handling annoying JavaScript alerts
I'm working on a web browser automation project. I'm using the .NET WebBrowser object for all of this. Certain pages have a JavaScript alert popup when the page is loaded. This stops the program until someone physically clicks on ok or closes the Alert. I've tried DestroyWindow, GetLastActivePopup, closeWindow and SendKeys but no luck. What else can I do??????
RobPosted Oct 14, 2008, 11:40 PM
Kirtan PatelPosted Oct 14, 2008, 9:45 AM
So Open
Internet Explorer > Tools> Internet Options >Security Tab
Click on "Custom Level " Button Find Option Active Scripting
and Select "Enable " Radio Button
Now it will not ask you for Any Script Confirmation :)
You Can Do this Thing Programmatically also By Registry programming using System.Win32 Class
by Changing DWORD Values of Security Zones .
Hope This Will Help You
Kirtan Patel