aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee')
-rw-r--r--vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee13
1 files changed, 13 insertions, 0 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee
new file mode 100644
index 00000000..0c89ca78
--- /dev/null
+++ b/vnfmarket/src/main/webapp/vnfmarket/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee
@@ -0,0 +1,13 @@
+# Read the Phantom webpage '#intro' element text using jQuery and "includeJs"
+
+page = require('webpage').create()
+
+page.onConsoleMessage = (msg) -> console.log msg
+
+page.open "http://www.phantomjs.org", (status) ->
+ if status is "success"
+ page.includeJs "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", ->
+ page.evaluate ->
+ console.log "$(\"#intro\").text() -> " + $("#intro").text()
+ phantom.exit()
+