title: Selenium WebDriver get border color
body: <p>Hi all i am trying to get border color of an extjs 4.2 form control text field using getCssValue method. But i am not able to fetch it. it is returning me blank. Below is my code snippet u can try this as is.</p>
  
  <pre><code>import org.openqa.selenium.By;
  import org.openqa.selenium.Keys;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  
  public class TestClass 
  {
      public static void main(String[] args) throws InterruptedException
      {
          WebDriver driver=new FirefoxDriver();
          Thread.sleep(2000);
          driver.get("http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/form/dynamic.html");
          Thread.sleep(2000);
          WebElement element=driver.findElement(By.xpath(".//input[@name='first']"));
          Thread.sleep(2000);
          element.sendKeys("");
          element.sendKeys(Keys.TAB);
          Thread.sleep(2000);
          System.out.println("'"+element.getCssValue("border-color")+"'");
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PCLbp.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/PCLbp.jpg" alt="Field, Xpath and CSS attribute highlighted in black border"></a></p>
  
  <p>Webdriver version 2.33 (Java binding)</p>
  
  <p>FF 22</p>