title: How to check firefox console output with Selenium/javascript?
body: <p>When I enter the following command into the firefox console I get 65. This is the number I want to check with selenium.</p>
  
  <pre><code>$('#grid').data('kendoGrid').dataSource.total()
  </code></pre>
  
  <p>Is there anyway I can get selenium to check this?</p>
  
  <p>I have tried the following,</p>
  
  <p>To test out javaScript, (this correctly checks title),</p>
  
  <pre><code>IJavaScriptExecutor js = driver as IJavaScriptExecutor;
  string title = (string)js.ExecuteScript("return document.title");
  Console.Write(var);
  </code></pre>
  
  <p>I have tried, both failed.</p>
  
  <pre><code>String num = (String)((IJavaScriptExecutor)driver).ExecuteScript("$('#grid').data('kendoGrid').dataSource.total()");
  Console.Write(num);
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>IJavaScriptExecutor js = driver as IJavaScriptExecutor;
  String script = "$('grid').data('kendoGrid').dataSource.total()";
  String num = (String)js.ExecuteScript("return", script);
  Console.Write(num);
  </code></pre>
  
  <p>I'm just using Console.Write to see the output.</p>