If I point phantomjs to this page:
<html>
<body>
<script>
$(document).ready(function () {
atesting();
});
</script>
</body>
</html>
with this phantomjs script
var page = require('webpage').create();
page.open('http://testpage.com', function(status) {
console.log("Status: " + status);
if(status === "success") {
page.render('testpage.png');
}
phantom.exit();
});
will it:
- call the “atesting()” function or
- will it not call it or
- will it “maybe sometimes” call the function because it might stay on it long enough so that the function is called?