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.
Error Object required
Do you want to continue running scripts on this page?
Yes / No
I would suggest using Ruby with one of Nokogiri/Capybara/Mechanize/Webkit/Selenium/Poltergeist etc. A lot more stable.