Categories
end-to-end javascript protractor selenium selenium-webdriver

Test hover state changes with protractor

No matter what I do I can’t get the hover state functional with protractor tests. The following code is semi functional ..

  • Works well in Firefox
  • Only works when I scroll the area into view with Chrome.
  • Fails in Phantom JS


obj
.getCssValue('color')
.then(function (color1) {
browser
.actions()
.mouseMove(obj)
.perform()
.then(function () {
obj
.getCssValue('color')
.then(function (color2) {
expect(color1)
.not
.toEqual(color2);
});
});