title: driver.executeScript() returns NullPointerException for simple javascript
body: <p><code>js.executeScript("return document.title")</code> works fine as expected but I'm not sure why my code returns null pointer error. what is wrong here?</p>
  
  <pre><code>   String testJs= "function test() {arr = 111; return arr;}; test();";
     JavascriptExecutor js = (JavascriptExecutor) driver;
     int a = (Integer) js.executeScript(testJS);
  </code></pre>