Serge Vinogradov Serge Vinogradov - 9 months ago 127
Javascript Question

C# WebBrowser - how to get rid of JavaScript error prompt?

I'm working with C# WebBrowser, and sometimes when the page is loaded (not always) I get following prompt:

An error has occured in the script on this page.
Line 1
Char 45774
Error Object required
Code 0
URL http://xxx.i_replaced_the_link_here.com/blah_BLAH_blah123

Do you want to continue running scripts on this page?
Yes / No


I want to continue, but I cannot be constantly clicking the Yes button.

How do you think I can fix it?

Answer Source

I would suggest using Ruby with one of Nokogiri/Capybara/Mechanize/Webkit/Selenium/Poltergeist etc. A lot more stable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download