mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Bug 1277090: Have Marionette return only attributes from getElementAttribute. r=ato
Using the Selenium atom we are conflating properties and attributes which is not thing we really want to be doing. MozReview-Commit-ID: HdZOz1jQrwz --HG-- extra : rebase_source : 70118dba39bb1a72e78a264d2a71beff3671f9cb
This commit is contained in:
parent
a5625a56b5
commit
186ffe49b4
@ -1786,7 +1786,16 @@ GeckoDriver.prototype.getElementAttribute = function*(cmd, resp) {
|
||||
case Context.CHROME:
|
||||
let win = this.getCurrentWindow();
|
||||
let el = this.curBrowser.seenEls.get(id, {frame: win});
|
||||
resp.body.value = atom.getElementAttribute(el, name, this.getCurrentWindow());
|
||||
|
||||
if (element.isBooleanAttribute(el, name)) {
|
||||
if (el.hasAttribute(name)) {
|
||||
resp.body.value = "true";
|
||||
} else {
|
||||
resp.body.value = null;
|
||||
}
|
||||
} else {
|
||||
resp.body.value = el.getAttribute(name);
|
||||
}
|
||||
break;
|
||||
|
||||
case Context.CONTENT:
|
||||
|
Loading…
Reference in New Issue
Block a user