Created
June 24, 2013 12:03
-
-
Save thecodejunkie/5849584 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(); | |
var system = require('system'); | |
var address; | |
address = system.args[1]; | |
console.log(address); | |
page.open(address, function(status) { | |
console.log(status); | |
}); | |
console.log('Done'); | |
phantom.exit(); |
My tests tend to do
before(function(done) {
setupPhantom(done)
})
after(function(done) {
closePhantom()
})
Oooh, hehe yeah that make sense. Cheers!
I've not gotten that far.. literally using it for the first time today and I'm following their "Getting Started" section before I dig any deeper :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lol - yes sorry ,obvious thing - if you call it at the end it'll be called before the page is opened and you'll never get the callback