ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Mouse Movements Do Not Trigger EventListeners Set in Chrome Extensions #1004

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:

Mouse movements do not trigger event listeners set in Chrome extensions.

Steps to reproduce:

1. Use the node.js selenium-webdriver library with ChromeDriver.
2. Create an HTML doc with a JS event listener on mouseover for a <span> 
3. Create a Chrome extension that has an event listener on mouseover (in 
content.js) on the same <span>

4. Observe that:
- OK : BOTH events are triggered when you manually mouse over the span

5. Using selenium-webdriver, drive mouse movement with 
driver.actions().mouseMove(elem).perform()
6. Observe that:
- OK   : The page's event listener is triggered
- ERR : The Chrome extensions's event listener is NOT triggered.

Best Guesses :

1. ChromeDriver is not using the `raw/native` events mode for .mouseMove() and 
can't trigger events set in Chrome Extensions 
[https://code.google.com/p/selenium/wiki/AdvancedUserInteractions]
2. WebDriver + ChromeDriver can work with `raw/native` events mode, but not 
from Node.js (maybe from Python, Ruby, etc?)
3. Chrome prevents ChromeDriver from accessing event listeners set inside of 
Chrome Extensions

Thanks for helping, hope it makes sense!

Original issue reported on code.google.com by ajw...@gmail.com on 16 Dec 2014 at 12:38

GoogleCodeExporter commented 9 years ago
A new guess:
4. I'm on OSX and native  or `raw` mode is not supported for user emulation
http://www.aosabook.org/en/selenium.html

Original comment by ajw...@gmail.com on 16 Dec 2014 at 12:51

GoogleCodeExporter commented 9 years ago
Another guess:
5. This also does not work in Ubuntu. (Just tried.) I really should have paid 
closer attention to previously mentioned 
https://code.google.com/p/selenium/wiki/AdvancedUserInteractions. I'll try 
Windows now.

Original comment by ajw...@gmail.com on 16 Dec 2014 at 6:07

GoogleCodeExporter commented 9 years ago
Wait, Ubuntu uses GNOME, so it should have worked, right?

Original comment by ajw...@gmail.com on 16 Dec 2014 at 6:22

GoogleCodeExporter commented 9 years ago
Can you provide  me (email to andrewcheng@chromium.org)

1. Use the node.js selenium-webdriver library with ChromeDriver.
2. Create an HTML doc with a JS event listener on mouseover for a <span> 
3. Create a Chrome extension that has an event listener on mouseover (in 
content.js) on the same <span>

   I will look into it.

Original comment by andrewch...@chromium.org on 18 Dec 2014 at 6:41

GoogleCodeExporter commented 9 years ago
The bad news, is that I'm an idiot and it seems to be working now, although
I have no idea why. :)

The good news is, it's working. Hehe. Oh man. No idea what's going on.

Thanks Andrew. Happy Holidays!

Adam

Original comment by ajw...@gmail.com on 18 Dec 2014 at 9:15

GoogleCodeExporter commented 9 years ago
good to hear  that. I will closed the issue.

Original comment by andrewch...@chromium.org on 18 Dec 2014 at 10:20

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:26