Hope you are doing well,
Purpose: Take Screenshot when page is fully loaded
Tried: Already tried with wait for some MS and when id was found take SS. But it wan't work as of now...
casper.waitFor(function StepOne() {
casper.wait(25000, function () {
casper.echo('after 25 sec');
casper.capture('screenshots/SS1.png');
});
casper.waitForSelector('#Row1',
function success() {
casper.CustomEcho('ID FOUND');
casper.capture('screenshots/SS2.png');
},
function fail() {
console.log("oops! ID is not Found..!.");
}
);
return true;
}, function StepTwo() {
casper.capture('screenshots/I_Am_in_Then_SS3.png');
casper.CustomEcho('*****_exit_*********');
casper.exit();
});
Thanks in advance!