Closed eusebiuplosnita closed 5 years ago
Which versions of Firefox and geckodriver are you using?
Firefox ESR 52.1.2 (64-bit) , geckodriver v0.16.1.
I've updated the selenium server to 3.4.0 and geckodriver to 0.18.0, but mouse events are still failing when running against firefox. @jason0x43 any idea if this will be fixed?
The Selenium moveto command, which is what moveMouseTo typically uses, isn't part of W3C WebDriver. WebDriver uses an Actions API, which Firefox and geckodriver at least partially implement, but we haven't added to Leadfoot yet since the spec is a bit...vague.
Until then, Firefox will need to stick with simulated events. Currently it disables the Selenium mouse commands (and uses simulated mouse events) for Firefox 49-51. We'll release a new point release of Leadfoot shortly that does this for all Firefox >= 49. Note that you'll need feature tests to be enabled (i.e., don't set fixSessionCapabilities
to false).
You can also disable the Selenium mouse commands in your tests now by setting the brokenMouseEvents
capability on the remote before any mouse-related tests run:
registerSuite({
name: 'a suite',
before: function () {
this.remote.session.capabilities.brokenMouseEvents = true;
},
...
});
This error was resolved in 547b13, set brokenMouseEvents for FF 49+
Hi! So I'm running some tests against firefox using geckodriver and when I'm calling moveMouseTo() I'm getting the following Exception:
I've found a similar question about hovering on an element and I managed to make moveMouseTo() work with geckodriver by executing the code from moveMouseTo function like we had the mouse events broken, so I just commented that 'if' related to brokenMouseEvents
`//if (this.capabilities.brokenMouseEvents) {
if(element){ ................. } else{ ................ } //}` But doing this breaks the scrolling, since moveMouseTo() can be used also to scroll for an element and also we cannot use it since the moveMouseTo() function is defined in node modules, and it will fail when we try to run the tests in Jenkins since Jenkins is running npm install every time it starts a new build. Another idea, I think, can be building a wrapper function to treat the case when we're running against Firefox, and in that case we should execute another code, and for the other browsers we can call moveMouseTo(), but in this case I'm not sure how to fix the scrolling issues for firefox. Does anyone have any idea about how can I fix this? Thanks!