I have to test header of the webpage to make sure it has correct color(#FFFFFF). Color value stored in css. I was trying to do this, but it doesn't work.
String headerColor =
driver.findElement(By.xpath(".//* [@id='title']/h1")).getCssValue("color");
Assert.assertTrue("#000000", sColor.equals("#FFFFFF"));}
Help me to do this correct way.