I have a test for hover states that use something like moveToElement and check that the element hidden normally is present on hovering.
This test passes fine if I use the debug images, but not the regular ones.
Does anyone know why this might be the case? Is there a way I can get it to pass reliably for non-debug images?
Hi @tnguyen14 could you rephrase the issue description and make it deterministic?
"something like moveToElement" -- so do you use moveToElement or what exactly? please be very specific.
"element hidden normally is present" -- what is "normally" can this be rephrased with concrete reproducible steps?
can you provide a complete test case in https://gist.github.com/ for example? that would be awesome.
Hi @elgalu,
My apologies for the vague bug report.
I did mean moveToElement.
Here's a simple set up to see this:
// test/index.js
module.exports = {
'hover': function (browser) {
browser
.url('https://lab.tridnguyen.com/demo.html')
.moveToElement('.container', 20, 10)
.assert.visible('.menu')
.end();
}
};
and
// nightwatch.json
{
"src_folders": ["test"],
"test_settings": {
"default": {
"desiredCapabilities": {
"browserName": "firefox"
}
}
}
}
And then run:
# install nightwatch
:; npm install nightwatch
# run the container
:; docker run -d -p 4444:4444 selenium/standalone-firefox
# run the test
:; nightwatch
When running that, I get the following error:
[Index] Test Suite
======================
Running: hover
✖ Testing if element <.menu> is visible. - expected "true" but got: "false"
at Object.hover (/home/tri/dev/temp/test/index.js:6:12)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
FAILED: 1 assertions failed (2.469s)
_________________________________________________
TEST FAILURE: 1 assertions failed, 0 passed. (2.561s)
✖ index
- hover (2.469s)
It works on chrome and firefox-debug.
Thanks for the great bug report @tnguyen14 !!!
I'm able to reproduce your issue but I'm surprised that is passing on firefox-debug as this seems to be a Firefox issue, independent of the debug image, or if using Zalenium for example.
See selenium logs from Zalenium

And I can see the error:
13:53:04.457 WARN - Exception thrown
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
I think this might be more related to https://github.com/SeleniumHQ/selenium/issues/3808
Yeah, the part about it passing on debug made me think originally that it's something with having a graphical interface... I believe the only difference between the regular image and the debug one is the addition of a vnc server, is that right?
I subscribed to that selenium issue, thanks for the reference.
Is it possible that is passing for you in the debug image because you have an older image? older Selenium or Firefox in there? I believe this issue is independent of VNC as the error message says org.openqa.selenium.UnsupportedCommandException: mouseMoveTo can't imagine how VNC can be related to that error. Can you double check your versions?
Oh you're right. It doesn't work on firefox, period. The reason I thought it was working on firefox-debug was because a script automatically switched from firefox-debug to chrome-debug in our test run due to #478. I stand corrected.
I think we can agree this is not a docker-selenium issue but upstream Selenium one so would be valid to close it here, what do you think?
Does someone knows which was the last version of Firefox & Selenium that this worked?
I guess Selenium 2 & FF 47
Does someone knows which was the last version of Firefox & Selenium that this worked?
I guess Selenium 2 & FF 47
Confirmed. Works with Selenium 2.53.1 and FF 47.0.1