Maybe with casper.back () and casper.forward ():
https://github.com/n1k0/casperjs/blob/master/tests/suites/casper/history.js
I believe that the previous form will be saved on the previous step. Hope try this.
Edit: getData (newPage) was an example of your own method, you can try something like this:
var password ="wtoc95a";
casper.getData = function (newPage, previousPageInputData) {
casper.open(newPage)
.then(function() {
});
return dataNeeded;
};
And in your form :
this.fill('form[id="signup_frm"]', {
nick_name: "pseudo",
e_mail: "mail",
password: "password",
password2: password,
input : casper.getData(arg1,arg2)
http://docs.casperjs.org/en/1.1-beta2/extending.html
Fanch source
share