I found a similar question here:
How do I suppress script errors when using the WPF WebBrowser control?
But non of those solutions work for me. I need to stop the popups from appearing as i am using the WebBrowser to automate admin tasks on a website.
SuppressScriptErrors
does not appear to be an available attribute on my WebControl :(
Well if it was necessary i would have gone for
WinformHost
and added WebBrowser Control to it and used it.You can easily do those tasks here in
WinformHost
also because i have made whole applications that does bundle of thingsThe answer by @SimonMourier didn't work for me, but this did:
Note that I got it from here.
Here is a C# routine that is capable of putting WPF's
WebBrowser
in silent mode. You can't call it at WebBrowser initialization as it 's too early, but instead after navigation occured. Here is a WPF sample app with a wbMain WebBrowser component: