lib/capybara/poltergeist/client/compiled/browser.js in poltergeist-1.15.0 vs lib/capybara/poltergeist/client/compiled/browser.js in poltergeist-1.16.0
- old
+ new
@@ -21,11 +21,11 @@
if (this.page != null) {
if (!this.page.closed) {
if (this.page.currentUrl() !== 'about:blank') {
this.page.clearLocalStorage();
}
- this.page.release();
+ this.page.close();
}
phantom.clearCookies();
}
this.page = this.currentPage = new Poltergeist.WebPage;
this.page.setViewportSize({
@@ -382,11 +382,11 @@
Browser.prototype.close_window = function(handle) {
var page;
page = this.getPageByHandle(handle);
if (page) {
- page.release();
+ page.close();
return this.current_command.sendResponse(true);
} else {
return this.current_command.sendResponse(false);
}
};
@@ -711,9 +711,15 @@
this.currentPage.goForward();
return this._waitForHistoryChange();
} else {
return this.current_command.sendResponse(false);
}
+ };
+
+ Browser.prototype.refresh = function() {
+ this.currentPage.state = 'wait_for_loading';
+ this.currentPage.reload();
+ return this._waitForHistoryChange();
};
Browser.prototype.set_url_whitelist = function() {
var wc, wildcards;
wildcards = 1 <= arguments.length ? slice.call(arguments, 0) : [];