title: Using protractor to test link colours
body: <p>How does one test the color of the link on hover using protractor?</p>
  
  <p>I want to simulate the mouse hovering over a link, that link changes from say white to blue and then I want the test to expect that the color = blue, on hover.</p>
  
  <p>code that I am currently using to test.</p>
  
  <pre><code>it('should redirect to the home page', function(){      
      element(by.css('ul.first_menu &gt; li &gt; a'));
      expect('ul.first_menu. &gt; li &gt; a'.getCssValue("color")).toEqual("rgba(11, 51, 60, 1)");
  
      browser.actions().mouseMove('ul.first_menu. &gt; li &gt; a').perform();
  
      browser.wait(waitForCssValue('ul.first_menu. &gt; li &gt; a', "color", "rgba(42, 100, 150, 1)"), 1000);
      browser.wait(waitForCssValue('ul.first_menu. &gt; li &gt; a', "text-decoration", "underline"), 1000);
  
      waitForCssValue = function (elementFinder, cssProperty, cssValue) {
              return function () {
                  return elementFinder.getCssValue(cssProperty).then(function(actualValue) {
                  return actualValue === cssValue;
                  });
              };
      };
  });
  </code></pre>