lib/capybara/poltergeist/client/compiled/agent.js in poltergeist-1.9.0 vs lib/capybara/poltergeist/client/compiled/agent.js in poltergeist-1.10.0
- old
+ new
@@ -260,10 +260,14 @@
Node.prototype.visibleText = function() {
if (this.isVisible()) {
if (this.element.nodeName === "TEXTAREA") {
return this.element.textContent;
} else {
- return this.element.innerText || this.element.textContent;
+ if (this.element instanceof SVGElement) {
+ return this.element.textContent;
+ } else {
+ return this.element.innerText;
+ }
}
}
};
Node.prototype.deleteText = function() {