Closed
Bug 1414241
Opened 7 years ago
Closed 7 years ago
Drag and Drop Action not working on <path> elements
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox57 unaffected, firefox58 fix-optional)
RESOLVED
DUPLICATE
of bug 1410796
Tracking | Status | |
---|---|---|
firefox57 | --- | unaffected |
firefox58 | --- | fix-optional |
People
(Reporter: lausklaus44, Unassigned)
References
Details
(Keywords: regression)
Attachments
(1 file)
86.38 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce: Kind of a follow-up of 1400256(https://bugzilla.mozilla.org/show_bug.cgi?id=1400256). I'm using Selenium .NET and have a couple of tests using drag and drop actions from the first circle-marker on a leaflet map (represented by a <path> element) to a Datatable of the items that the markers represent. The code looks like this: > IList<IWebElement> tourElements = Browser.Driver.FindElements(By.XPath("//table[@Id='DataTables_Table_0']/tbody/tr")); > IList<IWebElement> diameterElements = Browser.Driver.FindElements(By.CssSelector("path.mapTourItemCircleMarker.draggableCircleMarker.leaflet-clickable")); > var elementCountBefore = tourElements.Count; > var diameterBefore = diameterElements[1]; > //get Id of Mappoint to compare if it's in correct tour > var diameterId = diameterElements[1].GetAttribute("data-address-id"); > Actions dragdrop = new Actions(Browser.Driver); > dragdrop.DragAndDrop(diameterBefore, Browser.Driver.FindElement(By.XPath("//table[@Id='DataTables_Table_0']/tbody/tr[2]/td[2]"))) > .Build() > .Perform(); Actual results: An "InvalidArgumentError" is thrown when reaching the dragdrop action, with the info: > Expected 'origin' to be undefined, "viewport", "pointer", or an element, got: <path class="mapTourItemCircleMarker draggableCircleMarker leaflet-clickable"> The actual Action is hence never being executed. This happened after these changes were made in actions.js line 57: > - } else if (!WebElement.isReference(obj)) { > - throw new InvalidArgumentError("Expected 'origin' to be a string or a " + > - pprint`web element reference, got ${obj}`); > + } else if (!element.isDOMElement(obj)) { > + throw new InvalidArgumentError("Expected 'origin' to be undefined, " + > + '"viewport", "pointer", ' + > + pprint`or an element, got: ${obj}`); > } For reference: I'm using the latest version of Nigthly (https://hg.mozilla.org/mozilla-central/rev/b2f459b88cab5525c785a7fa70a01be3e9cdcb23) I also attached the tracelog I previously posted in my comment on 1400256 (sorry about that). Expected results: The circle-marker should have been dragged to the Datatable element and dropped there.
Comment 1•7 years ago
|
||
Thank you a lot for filing this bug, and especially hunting down the regression! Andreas, as it looks like there is one more fallout from your WebElement patch. Can you please have a look? Thanks.
Blocks: 1400256
Status: UNCONFIRMED → NEW
status-firefox57:
--- → unaffected
status-firefox58:
--- → affected
Ever confirmed: true
Flags: needinfo?(ato)
Keywords: regression
Comment 2•7 years ago
|
||
I’m quite sure this was resolved by https://bugzil.la/1410799 because the action module uses the same element.isDOMElement check as the known element store. Can you please re-test with the latest Firefox Nightly build?
Flags: needinfo?(ato) → needinfo?(lausklaus44)
Comment 3•7 years ago
|
||
The reporter is using Windows and tested with the Nightly from 20171102222620. The fix on bug 1410799 is first available for the Nightly 20171102222620. So it's the right Nightly build he tested. As such the problem has not been fixed.
Flags: needinfo?(lausklaus44)
Updated•7 years ago
|
Comment 4•7 years ago
|
||
Sorry I earlier meant https://bugzil.la/1410796. It changes element.isDOMElement to also incorporate SVG elements, or to be more precise, any non-XUL element. Because there is no reproducible steps here I’m unable to actually verify this assumption, but I am most willing to re-open this bug if that is not the case.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Comment 5•7 years ago
|
||
Reporter, can you please try again with the latest nightly and if it still occurs?
Updated•7 years ago
|
Flags: needinfo?(lausklaus44)
Reporter | ||
Comment 6•6 years ago
|
||
Sorry for the late reply. It's working now. Thanks for your help!
Flags: needinfo?(lausklaus44)
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•