1 # Read the Phantom webpage '#intro' element text using jQuery and "includeJs"
3 page = require('webpage').create()
5 page.onConsoleMessage = (msg) -> console.log msg
7 page.open "http://www.phantomjs.org", (status) ->
9 page.includeJs "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", ->
11 console.log "$(\"#intro\").text() -> " + $("#intro").text()