title: Windows 2012 R2 build server - IE 11 Selenium (UnexpectedJavaScriptError)
body: <p>I'm creating automation tests in C# and .NET 4.5 and SpecFlow + NUnit</p>
  
  <p>My ASP.NET MVC application has Kendo MVC controls. On one of the pages there is a JavaScript variable that we create to indicate that all client side Kendo fields are loaded.</p>
  
  <p>From one of my NUnit tests has C# code to read the value of the client side variable using below script: </p>
  
  <pre><code>public override void EnsurePageReady()
      {
          do
          {
              try
              {
                  var fieldsLoaded = WebDriver.ExecuteJavaScript&lt;bool&gt;("return kendoFieldsLoaded;");
                  if (fieldsLoaded)
                  {
                      break;
                  }
              }
              catch (WebDriverException)
              {
              }
              Thread.Sleep(200);
          } while (true);
      }
  </code></pre>
  
  <p>The ExecuteJavaScript() works fine locally in all three major browser (Chrome, Firefox, IE11). However I get UnexpectedJavaScriptError) on the Build Server with Windows Server 2012 R2 and IE11 on Windows 10. </p>
  
  <p>I've tried all the suggestion on the Internet including Registry changes, Enabling protected Mode etc, but no luck. </p>
  
  <p>I'm hitting a wall and I would appreciate any help or pointers that I can get to resolve this issue.</p>
  
  <p>Thanks!</p>