stirno/FluentAutomation — Issue #45: OnChange causes an UnexpectedJavascriptError in IE9
Author: mrshrinkray
Created: 2011-11-11 19:39:11+00:00
State: open

In the SeleniumWebDriver.Element.OnChange method (line 121) has problems with IE, including IE9:

public virtual void OnChange()
{
((IJavaScriptExecutor)_driver).ExecuteScript(string.Format("if (typeof jQuery != 'undefined') {{ jQuery(\"{0}\").click(); }}", _fieldSelector.Replace("\"", "")));
}

The answer appears to be to use click(), from this discussion: http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie

Or if you're using jQuery 1.5 the problem is resolved but unfortunately we're using jQuery 1.3.

Once I setup Github I'll try to push a patch