You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the value of a link using JQuery. Here is my code
var $ = require('jquerygo');
$.config.addJQuery = true;
$.config.JQuery = 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js';
// Visit the user path and log in.
$.visit('http://www.restive.io', function() {
$.waitForPage(function(){
// Get the value of a link
var result = $("#bs-prime-links .container .b-line").html();
console.log(result);
$.close();
});
});
However, when I run this I get the following error:
Navigating to http://www.restive.io
Viewport set to: 1920x1080
Console:1920
Console:1
undefined
Closing
stream.js:94
throw er; // Unhandled stream error in pipe.
^
TypeError: Cannot call method 'call' of undefined
at context (/root/dev/jquerygo/node_modules/jquerygo/lib/jquery.go.js:215:16)
at page.evaluate.selector (/root/dev/jquerygo/node_modules/jquerygo/lib/jquery.go.js:187:16)
at Proto.apply (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/dnode-protocol/index.js:123:13)
at Proto.handle (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/dnode-protocol/index.js:99:19)
at D.dnode.handle (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/lib/dnode.js:140:21)
at D.dnode.write (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/lib/dnode.js:128:22)
at SockJSConnection.ondata (stream.js:51:26)
at SockJSConnection.emit (events.js:95:17)
at Session.didMessage (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/shoe/node_modules/sockjs/lib/transport.js:220:25)
at WebSocketReceiver.didMessage (/root/dev/jquerygo/node_modules/jquerygo/node_modules/phantom/node_modules/shoe/node_modules/sockjs/lib/trans-websocket.js:102:40)
I don't know why this is happening. Kindly assist.
The text was updated successfully, but these errors were encountered:
I am trying to get the value of a link using JQuery. Here is my code
However, when I run this I get the following error:
I don't know why this is happening. Kindly assist.
The text was updated successfully, but these errors were encountered: