Closed
Bug 1460844
Opened 8 years ago
Closed 8 years ago
Unable to perform move_to_element to hidden element
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1453779
People
(Reporter: quarckster, Unassigned)
Details
Webdriver raises the exception when automation tries to perform move_to_element to hidden element. It seems there is an issue in javascript code in omni.ja https://developer.mozilla.org/en-US/docs/Mozilla/About_omni.ja_(formerly_omni.jar). There is a stacktrace of it:
element.getInViewCentrePoint@chrome://marionette/content/element.js:1160:5
getElementCenter@chrome://marionette/content/action.js:1440:14
dispatchPointerMove/<@chrome://marionette/content/action.js:1327:18
dispatchPointerMove@chrome://marionette/content/action.js:1323:10
toEvents/<@chrome://marionette/content/action.js:1110:16
action.dispatchTickActions@chrome://marionette/content/action.js:1020:23
action.dispatch/chainEvents<@chrome://marionette/content/action.js:989:13
action.dispatch@chrome://marionette/content/action.js:987:22
performActions@chrome://marionette/content/listener.js:786:9
dispatch/</req<@chrome://marionette/content/listener.js:491:14
dispatch/<@chrome://marionette/content/listener.js:484:15
TypeError: rect is undefined
Steps to reproduce:
1.Create a simple html page:
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
</head>
<body>
<p style="display: none;" id="test">Test</p>
</body>
</html>
2. Execute the following python code. It tries to perform move_to_element to hidden element.
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
opts = Options()
driver = webdriver.Remote(desired_capabilities=opts.to_capabilities(), command_executor='http://127.0.0.1:4444/wd/hub')
driver.get("test.html")
el = driver.find_element_by_id("test")
move_to = ActionChains(driver).move_to_element(el)
move_to.perform()
Actual Result:
An exception is raised
Geckodriver trace-level log:
1526020736802 webdriver::server DEBUG -> POST /session/938000dd-b742-4593-9d65-2fa3e1f777f4/element {"using": "css selector", "value": "[id=\"test\"]"}
1526020736803 geckodriver::marionette TRACE -> 68:[0,4,"findElement",{"using":"css selector","value":"[id=\"test\"]"}]
1526020736804 Marionette TRACE 0 -> [0,4,"findElement",{"using":"css selector","value":"[id=\"test\"]"}]
1526020736806 Marionette TRACE 0 <- [1,4,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"b377e902-42bb-4c17-bc85-f687fb01d930","ELEMENT":"b377e902-42bb-4c17-bc85-f687fb01d930"}}]
1526020736807 geckodriver::marionette TRACE <- [1,4,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"b377e902-42bb-4c17-bc85-f687fb01d930","ELEMENT":"b377e902-42bb-4c17-bc85-f687fb01d930"}}]
1526020736807 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"b377e902-42bb-4c17-bc85-f687fb01d930"}}
1526020763090 webdriver::server DEBUG -> POST /session/938000dd-b742-4593-9d65-2fa3e1f777f4/actions {"actions": [{"parameters": {"pointerType": "mouse"}, "type": "pointer", "id": "mouse", "actions": [{"duration": 250, "x": 0, "type": "pointerMove", "y": 0, "origin": {"element-6066-11e4-a52e-4f735466cecf": "b377e902-42bb-4c17-bc85-f687fb01d930"}}]}, {"type": "key", "id": "key", "actions": [{"duration": 0, "type": "pause"}]}]}
1526020763091 geckodriver::marionette TRACE -> 323:[0,5,"performActions",{"actions":[{"actions":[{"duration":250,"origin":{"element-6066-11e4-a52e-4f735466cecf":"b377e902-42bb-4c17-bc85-f687fb01d930"},"type":"pointerMove","x":0,"y":0}],"id":"mouse","parameters":{"pointerType":"mouse"},"type":"pointer"},{"actions":[{"duration":0,"type":"pause"}],"id":"key","type":"key"}]}]
1526020763092 Marionette TRACE 0 -> [0,5,"performActions",{"actions":[{"actions":[{"duration":250,"origin":{"element-6066-11e4-a52e-4f735466cecf":"b377e902-42bb- ... "parameters":{"pointerType":"mouse"},"type":"pointer"},{"actions":[{"duration":0,"type":"pause"}],"id":"key","type":"key"}]}]
1526020763100 Marionette TRACE 0 <- [1,5,{"error":"unknown error","message":"TypeError: rect is undefined","stacktrace":"element.getInViewCentrePoint@chrome://ma ... ch/</req<@chrome://marionette/content/listener.js:491:14\ndispatch/<@chrome://marionette/content/listener.js:484:15\n"},null]
1526020763101 geckodriver::marionette TRACE <- [1,5,{"error":"unknown error","message":"TypeError: rect is undefined","stacktrace":"element.getInViewCentrePoint@chrome://marionette/content/element.js:1160:5\ngetElementCenter@chrome://marionette/content/action.js:1440:14\ndispatchPointerMove/<@chrome://marionette/content/action.js:1327:18\ndispatchPointerMove@chrome://marionette/content/action.js:1323:10\ntoEvents/<@chrome://marionette/content/action.js:1110:16\naction.dispatchTickActions@chrome://marionette/content/action.js:1020:23\naction.dispatch/chainEvents<@chrome://marionette/content/action.js:989:13\naction.dispatch@chrome://marionette/content/action.js:987:22\nperformActions@chrome://marionette/content/listener.js:786:9\ndispatch/</req<@chrome://marionette/content/listener.js:491:14\ndispatch/<@chrome://marionette/content/listener.js:484:15\n"},null]
1526020763101 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"TypeError: rect is undefined","stacktrace":"element.getInViewCentrePoint@chrome://marionette/content/element.js:1160:5\ngetElementCenter@chrome://marionette/content/action.js:1440:14\ndispatchPointerMove/<@chrome://marionette/content/action.js:1327:18\ndispatchPointerMove@chrome://marionette/content/action.js:1323:10\ntoEvents/<@chrome://marionette/content/action.js:1110:16\naction.dispatchTickActions@chrome://marionette/content/action.js:1020:23\naction.dispatch/chainEvents<@chrome://marionette/content/action.js:989:13\naction.dispatch@chrome://marionette/content/action.js:987:22\nperformActions@chrome://marionette/content/listener.js:786:9\ndispatch/</req<@chrome://marionette/content/listener.js:491:14\ndispatch/<@chrome://marionette/content/listener.js:484:15\n"}}
| Reporter | ||
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Component: General → Marionette
Product: Firefox → Testing
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•