How to handle colors in web driver?

Use getCssValue(arg0) function to get the colors by sending 'color' string as an argument.
Example:
String col = driver.findElement(By.id(locator)).getCssValue("color");

0 comments: