angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

Mouse hover only works when mouse pointer is outside browser area [bug, Chrome only] #3802

Open latobibor opened 7 years ago

latobibor commented 7 years ago

Bug report

I created a bug based on @csanthoshi 's original comment on this issue: https://github.com/angular/protractor/issues/159#issuecomment-242356184

In short mouse hover event won't happen in Chrome if you left the mouse pointer over the browser area (while it works on FireFox). Even if Chrome is not the active window of your OS. Without a fix testing all hover-based functionality (like a hover activated dropdown menu) is basically luck-based: either someone left the mouse pointer over the browser in one of the test-automation virtual machines or not.

I am unable to hover over an element( hyper link). I observed that when I placed my physical mouse pointer on the browser( launched through automation ) the element did not hovered but once I moved the physical pointer outside of the browser as soon as run gets triggered, the hovering action is passing successfully. I am running the script in chrome browser using protractor The code snippet that I used is browser.sleep( 8000 ); var ele = element( by.xpath( '//tf-infobox//[normalize-space(.)="Error 1"]/following-sibling:://a' ) ); browser.actions().mouseMove( ele ).perform(); browser.sleep( 5000 ); Additional Info: hover event is not fired. Chrome-driver version: 2.21

My test setup to reproduce the issue:

cnishina commented 7 years ago

If it works on Firefox and not on Chrome, this issue should be filed against the chromedriver project.

latobibor commented 7 years ago

@cnishina Hi Craig, I have opened an issue: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1634 . Thanks for the tip.