title: How to check if a text is highlighted on the page using Selenium?
body: <p>1> What does highlighted text means? 
    Suppose you browse any page , select any text on that page using mouse or some other means. Let say "<img src="https://i.stack.imgur.com/q3rwH.jpg" alt="Hello">" , "Sign Up "text is highlighted. Please correct my understanding if its wrong.</p>
  
  <p>2> I tried the below code to get CssValue of color and background-color.
  Using the given code:</p>
  
  <pre><code>    driver.get("https://facebook.com");
      String textColor = driver.findElement(By.xpath("//*[@id='pageFooter']/div[3]/div/span")).getCssValue("color");
      String bkgColor = driver.findElement(By.xpath("//*[@id='pageFooter']/div[3]/div/span")).getCssValue("background-color");
      System.out.println("TextColor : " + textColor );
      System.out.println("Background Color : " + bkgColor);
  </code></pre>
  
  <p>output:-</p>
  
  <pre><code>TextColor : rgba(115, 115, 115, 1)
  Background Color : transparent
  </code></pre>
  
  <p>*TextColor gives the color of text. </p>
  
  <p>** For highlighting i am using Robot class to send Ctrl+A  , though its selecting entire page, but it should output some different value. In that case also it's giving the text color only as above output.</p>
  
  <p>Please let me know if i am doing right or is my understanding about highlighted text is correct. </p>