Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / phantomjs / lib / phantom / examples / phantomwebintro.coffee
1 # Read the Phantom webpage '#intro' element text using jQuery and "includeJs"
2
3 page = require('webpage').create()
4
5 page.onConsoleMessage = (msg) -> console.log msg
6
7 page.open "http://www.phantomjs.org", (status) ->
8   if status is "success"
9     page.includeJs "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", ->
10       page.evaluate ->
11         console.log "$(\"#intro\").text() -> " + $("#intro").text()
12       phantom.exit()
13