2017-05-12 1 views

Antwort

0

Sie beschrieben versuchen nightmare-download-manager verwenden, können und etwas tun, wie folgt aus:

nightmare.on('download', function(state, downloadItem) { 
    if(state == 'started') { 
     nightmare.emit('download', 'yourfilename.txt', downloadItem); 
    } else if(state == 'completed') { 
     console.log('Donwload completed'); 
    } else if(state == 'interrupted') { 
     endNightmare(); 
    } else if(state == 'cancelled') { 
     endNightmare(); 
    } 
}); 

nightmare 
.downloadManager() 
.goto(url) 
.click('#javascriptDownloadBtn') 
.waitDownloadsComplete() 
.then(function() { 
    return nightmare.end(); 
}) 
+0

Wie machst du das für Bilder? wie replizieren Rechtsklick Bild speichern. –