Finding color of the text in selenium

Below is the code, trying to find the colour of the text 'Special Assistance' in spicejet.com. I am expecting rgb value as (196,18,48) (as shown in the developer view during inspection of the element) however when i run the program it displays value as rgba (0,0,0,1);

    driver.get("https://www.spicejet.com");
    driver.manage().window().maximize();
    WebElement ele = driver.findElement(By.xpath("//a[text()='Special Assistance']"));
    System.out.println(ele.getCssValue("color"));

please help



Read more here: https://stackoverflow.com/questions/64896573/finding-color-of-the-text-in-selenium

Content Attribution

This content was originally published by rashcode282 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: