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