Here's the situation:
pagepage to go to page2page2 to go to page3Now I am on page 3 and I call this.back() within a then statement and it does go back to page 2 and everything just stops executing after that
I also tried to call
this.then(function() {
this.evaluate(function() {
history.go(-1);
});
});
and it goes back to page2 and gets stuck again. The next line won't execute.
Any ideas or is this a bug?
Typically, the following code works for me:
casper.then(function () {
this.back();
});
Make sure you are running on a step your code and finally, in a separate step, the step of returning the page. This is necessary so that your .back be done AFTER your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With