Commit a04d47a8 a04d47a8dd8b29f8574771241eacdbddbff534e1 by Nicolas Perriault

fixed Casper.reload() which wasn't working properly

1 parent 02a19f6e
......@@ -1133,13 +1133,13 @@ Casper.prototype.open = function open(location, settings) {
Casper.prototype.reload = function reload(then) {
"use strict";
this.checkStarted();
this.evaluate(function() {
window.location.reload();
// window.location.reload() is broken under phantomjs
this.then(function() {
this.open(this.getCurrentUrl());
});
if (then && utils.isFunction(then)) {
if (utils.isFunction(then)) {
this.then(this.createStep(then));
}
return this;
};
/**
......