Recently, I've been experimenting with CasperJS in an attempt to identify Free-Email Alias on
My focus is on the input field labeled "E-Mail-Wunschname:" where I intend to input a name, click the "Prüfen" button, and then extract the suggested accounts.
Here's what I have attempted so far:
var casper = require('casper').create({
pageSettings: {
loadImages: false,
loadPlugins: true,
userAgent:('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0')
}
});
var mouse = require("mouse").create(casper);
casper.start('https://registrierung.web.de/#.homepage.loginbox_1.1.registrierung').viewport(1200,1000);
casper.then(
function() {
this.sendKeys('.wishname.feedback-panel-trigger.multiReplaceCharsInWishnamelField',"Test");
this.sendKeys('.wishname.feedback-panel-trigger.multiReplaceCharsInWishnamelField',casper.page.event.key.Enter);
this.wait(5000);
}
);
casper.then(function() {
this.wait(5000);
this.capture('webde.png');
console.log('clicked ok, new location is ' + this.getCurrentUrl());
});
casper.run();
I also experimented with clicking the button using the following code:
casper.wait(6000, function() {
this.evaluate(function(){
document.querySelector('.wishname.feedback-panel-trigger.multiReplaceCharsInWishnamelField').value = "Test";
document.querySelector('#checkAvailabilityBtn').click();
});
});
casper.then(function() {
this.capture('webde.png');
console.log('clicked ok, new location is ' + this.getCurrentUrl());
});
Despite my efforts, both methods resulted in a full submission of the page rather than just generating the suggestions.