Cannot hover on Button twice
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(firefox66 wontfix, firefox67 wontfix, firefox68 wontfix, firefox69 wontfix)
People
(Reporter: gevorg.stdev, Unassigned, NeedInfo)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(1 file)
15.88 KB,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Steps to reproduce:
- Create webdriver instance.
- Go to "https://www.google.com" page.
- Hover on "Google Search" button.
- Make sure that button's color changed.
- In same instance of webDriver repeat steps 2-4 .
Actual results:
In the first time the "Google Search" button changed the color as expected, but in the next steps button is not hovered.
Expected results:
The "Google Search" button should be hovered and changed the color as expected.
Comment 1•6 years ago
|
||
Is that a problem which started to happen with Firefox 65? Did Firefox 64 work for those steps?
No, Firefox 64 version not work for those steps.
Comment 4•6 years ago
|
||
Interesting. This has the same regression range like https://github.com/mozilla/geckodriver/issues/1507. We currently track down the version on that github issue.
Comment 5•6 years ago
|
||
As investigated on https://github.com/mozilla/geckodriver/issues/1507 this regressed on 2018-10-22 with the following changes:
Andreas, could it be that bug 1499360 is the culprit here?
Comment 6•6 years ago
•
|
||
That seems likely, because dispatchPointerMove
relies on
element.getInViewCentrePoint
to get the origin element’s centre
point, and that is used as the basis for the X/Y offset of how far
to move the pointer.
One of the trace logs shows a pointerMove
action defined this
way:
{
"duration": 100,
"x": 0,
"y": 0,
"type": "pointerMove",
"origin": {
"ELEMENT": "b645c976-4ea1-4331-83d8-61c23ec1d5af",
"element-6066-11e4-a52e-4f735466cecf": "b645c976-4ea1-4331-83d8-61c23ec1d5af"
}
}
If the first client rect of origin
is sufficiently small, say 1x1
px, the centre point is calculated to be (0,0) in order for
DOMElement.elementsFromPoint
to get the correct paint tree. If
the centre point was (1,1) and the element 1x1 px, the paint tree
coordinate would be outside the bounds of the element.
If you give x
and y
in the above example the values of 1, I
suspect the test will pass. This leads me to wonder if
element.getInViewCentrePoint
should not ceil the value, and that
WebDriver should subtract 1 px when calling DOMElement.elementsFromPoint
instead…
It would be interesting to know what the x
/y
coordinates computed
by element.getInViewCentrePoint
are? It would also be great to
have a reduced test case. I suspect a 1x1 px <div>
reacting in
some way to being hovered with pointerMove
should be sufficient.
We can also test this theory by setting the
moz:useNonSpecCompliantPointerOrigin
capability to true. This
should avoid calling element.getInViewCentrePoint
and instead use
element.coordinates
.
Comment 7•6 years ago
|
||
As additionally noted on the Github issue enabling moz:useNonSpecCompliantPointerOrigin
via the capabilities causes this problem to disappear.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
I tried to replicate this bug but I'm not able to. At least in recent versions of Firefox it works just fine and it doesn't matter which value moz:useNonSpecCompliantPointerOrigin
actually has. The Marionette testcase that I've used is:
def test_actions(self):
url = inline("""
<style>
body {
margin: 0;
padding: 0;
}
div {
width: 100px;
height: 100px;
background: red;
}
div:hover {
background: green;
}
</style>
<div id="foo"></div>
""")
self.marionette.navigate(url)
elem = self.marionette.find_element(By.ID, "foo")
mouse_chain = self.marionette.actions.sequence(
"pointer", "pointer_id", {"pointerType": "mouse"}
)
mouse_chain.pointer_move(0, 0, origin=elem).perform()
self.marionette.actions.release()
self.marionette.navigate(inline("<div>other page</div>"))
self.marionette.go_back()
elem = self.marionette.find_element(By.ID, "foo")
mouse_chain = self.marionette.actions.sequence(
"pointer", "pointer_id", {"pointerType": "mouse"}
)
mouse_chain.pointer_move(0, 0, origin=elem).perform()
self.marionette.actions.release()
I've asked on the github issue for geckodriver if someone can still reproduce. If not I think that we can go ahead and close this issue as WFM.
Gevorg, I know it's been a while but maybe you can check yourself? Thanks!
Comment 9•2 years ago
|
||
Actually I tried with an Firefox 78.0 build and I was able to reproduce the problem with the above mentioned Marionette script. After the navigation and returning to the original page the hover was still present. When testing following releases the first one which doesn't show this issue anymore is Firefox 84. With this release we enabled our JSWindowActor infrastructure for Fission by default, and I'm sure that this fixed it.
Gevorg, if you can still see it please reopen the bug. Otherwise I consider this bug as WFM.
Updated•2 years ago
|
Description
•