Open link in PhantomJS synchronously
问题 I want to know is there any way to click link (open link) on PhantomJS synchronously. First page must be opened first, then click link on the first page to go to second page. Here is my approach using setTimeout: var page = require('webpage').create(); var url = "http://domain.tld/index.html"; page.open(url, function (status) { page.render("1-home.png"); page.evaluate(function() { // search for element and click it to redirect document.getElementById("RetailUser").click(); }); // I use