Permalink
Browse files

Update example phantomwebintro (#14545)

Use lastest version of `jQuery`
  • Loading branch information...
1 parent c83956e commit 138b8cc669f274ed09337ea1cf5aa6937a1cf0ab @brutalcrozt brutalcrozt committed with Vitallium Oct 10, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 examples/phantomwebintro.js
@@ -1,4 +1,4 @@
-// Read the Phantom webpage '#intro' element text using jQuery and "includeJs"
+// Read the Phantom webpage '.version' element text using jQuery and "includeJs"
"use strict";
var page = require('webpage').create();
@@ -9,9 +9,10 @@ page.onConsoleMessage = function(msg) {
page.open("http://phantomjs.org/", function(status) {
if (status === "success") {
- page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() {
+ page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js", function() {
page.evaluate(function() {
- console.log("$(\".explanation\").text() -> " + $(".explanation").text());
+ // lastest version on the web
+ console.log("$(\"span.version\").text() -> " + $("span.version").text());
});
phantom.exit(0);
});

0 comments on commit 138b8cc

Please sign in to comment.