Hey everyone, I'm currently trying to retrieve the border color of an extjs 4.2 form control text field using the getCssValue method. However, I'm having trouble getting the value as it's coming back blank. Below is a sample of my code that you can test out:
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")+"'");
}
}
https://i.stack.imgur.com/PCLbp.jpg
WebDriver version 2.33 (Java binding)
Firefox 22