title: Unable to highlight WebElement in Selenium using JavascriptExecutor for Firefox 35
body: <p>While executing the script used to highlight and reset a WebElement in selenium 2.43:
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public void highlightElement(WebElement element) {
    String originalStyle = element.getAttribute("style");
    JavascriptExecutor js = (JavascriptExecutor) selenium;
    js.executeScript("arguments[0].setAttribute('style', arguments[1]);",element,
                      "color: red; border: 5px solid red;");
    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) {}
    js.executeScript("arguments[0].setAttribute('style', '" + originalStyle + "');", element);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Eclipse returns error:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>org.openqa.selenium.WebDriverException: arguments[0] is undefined
  Command duration or timeout: 74 milliseconds
  Driver info: org.openqa.selenium.firefox.FirefoxDriver
  Capabilities [{platform=WINDOWS, databaseEnabled=true, cssSelectorsEnabled=true, javascriptEnabled=true, acceptSslCerts=true, handlesAlerts=true, browserName=firefox, webStorageEnabled=true, nativeEvents=false, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=35.0}]</code></pre>
  </div>
  </div>
  </p>
  
  <p>Observed the issue after Firefox 35 update. Is there a workaround?</p>