Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 141485

Why does CasperJS capture is not working?

$
0
0

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!


Viewing all articles
Browse latest Browse all 141485

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>