I want my casper to log in and stay logged in during the session. Is it possible? If so, how?
If you want to store cookies in CasperJS, you can use the PhantomJS cookiejar, which is accesible natively through CasperJS.
Simply add following option when you launch CasperJS:
--cookies-file=cookies.txt
Your cookies will be stored in that file. Even after exiting CasperJS, if you call CasperJS with this option, you'll have access to those cookies again.
Hope that helps.
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