From c5802a32048035fd5a539889cabbddae3c3c386c Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 29 Sep 2017 12:54:03 +0200 Subject: [PATCH] Bug 1404277 - Retrieve namespaceURI as property and not attribute. r=ato With newer Selenium atoms which do not conflate attributes and properties, the retrieval via getElementAttribute will fail. By retrieving it directly as property will fix it. MozReview-Commit-ID: CFy3JZDeUWq --HG-- extra : rebase_source : ed3a358f52b7cd54f3c5dda037fddaa93173e3b6 --- testing/marionette/element.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/marionette/element.js b/testing/marionette/element.js index e0b883a4e55d..5f53eb84e219 100644 --- a/testing/marionette/element.js +++ b/testing/marionette/element.js @@ -25,7 +25,9 @@ const logger = Log.repository.getLogger("Marionette"); this.EXPORTED_SYMBOLS = ["element"]; const DOCUMENT_POSITION_DISCONNECTED = 1; + const XMLNS = "http://www.w3.org/1999/xhtml"; +const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const uuidGen = Cc["@mozilla.org/uuid-generator;1"] .getService(Ci.nsIUUIDGenerator); @@ -946,8 +948,7 @@ element.scrollIntoView = function(el) { }; element.isXULElement = function(el) { - let ns = atom.getElementAttribute(el, "namespaceURI"); - return ns.indexOf("there.is.only.xul") >= 0; + return el.namespaceURI === XULNS; }; const boolEls = {