How to download image from link direct to save or download button click with CasperJS?

46 Views Asked by At

I am trying to download an image with CasperJS. The thing is that I need to download this image from either the click button event or from the direct download link. I have no code yet, so could anyone help me?

thank you all!

1

There are 1 best solutions below

0
MNN On

You could use captureSelector() if you know the specifics of the DOM element you want to capture (class, id, xpath, etc), or download() the targeted resourse with it's URI.

You can find the right method for your need in the Casper Module API Documentation