lib/capybara/poltergeist/client/compiled/node.js in poltergeist-0.5.0 vs lib/capybara/poltergeist/client/compiled/node.js in poltergeist-0.6.0
- old
+ new
@@ -1,9 +1,9 @@
var __slice = Array.prototype.slice, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Poltergeist.Node = (function() {
var name, _fn, _i, _len, _ref;
- Node.DELEGATES = ['text', 'getAttribute', 'value', 'set', 'setAttribute', 'removeAttribute', 'isMultiple', 'select', 'tagName', 'find', 'isVisible', 'position', 'trigger', 'parentId', 'clickTest'];
+ Node.DELEGATES = ['text', 'getAttribute', 'value', 'set', 'setAttribute', 'isObsolete', 'removeAttribute', 'isMultiple', 'select', 'tagName', 'find', 'isVisible', 'position', 'trigger', 'parentId', 'clickTest'];
function Node(page, id) {
this.page = page;
this.id = id;
}
Node.prototype.parent = function() {
@@ -62,10 +62,10 @@
pos = this.clickPosition();
test = this.clickTest(pos.x, pos.y);
if (test.status === 'success') {
return this.page.sendEvent('click', pos.x, pos.y);
} else {
- throw new Poltergeist.ClickFailed(test.selector, pos);
+ return new Poltergeist.ClickFailed(test.selector, pos);
}
};
Node.prototype.dragTo = function(other) {
var otherPosition, position;
position = this.clickPosition();
\ No newline at end of file