I was tasked with implementing a script in CasperJS that aims into entering an email address in the Google sign-in page and then evaluating the response page.
Script:
---------
var casper = require('casper').create({
// Configuration //
});
casper.wait(10000,function(){})
casper.then(function() {
// Evaluate response page //
});
For configuration I used:
-------------------------------------
pageSettings: {
userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',
javascriptEnabled: true,
loadImages: true,
loadPlugins: true
},
viewportSize: {
width: 1366,
height: 768
}
THE PROBLEM: For some time it was working perfectly fine and the specified user agent string was the ONLY string that directed me perfectly to response page.
But after that without changing anything on the script I was waiting forever for the response page to load (30 min and more). So I thought it was the user agent fault since Google Chrome was
updated so I changed it to 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36'. But then I was remaining stil in the same page, the response
page wasn`t even loading.
MY QUESTION: Is really the user agent affecting all this and how? Is there any other configuration I should input in order to work? Note: I know Google isn`t allowing this but why it was working for some time and then not.. Is it CasperJS fault or Google`s banning it?