Created
April 19, 2016 12:58
-
-
Save necenzurat/d4e9ee793d37e0c9165923493cd92b22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.open("http://www.dauanunt.ro/cont/login", function(status) { | |
if ( status === "success" ) { | |
page.evaluate(function() { | |
document.querySelector("input[name='u']").value = "[email protected]"; | |
document.querySelector("input[name='p']").value = "testing"; | |
document.querySelector("input[type='submit']").click(); | |
console.log("Login submitted!"); | |
}); | |
window.setTimeout(function () { | |
page.render('fucking-hell-we-are-in.png'); | |
phantom.exit(); | |
}, 5000); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment