Cant find source of SyntaxError: Parse error in a short script

9 views
Skip to first unread message

BASH

unread,
Sep 30, 2016, 2:00:54 PM9/30/16
to phantomjs
I am new to javascript, phantomjs, and headless browsers in general.  The following short script works but I get a SyntaxError:  Parse error in the output of the script:

// version 1.9.0
var page = require('webpage').create() ;
// no particular reason I choose jameco.com
// this is the page you are directed to if you pull it up in firefox for example
page.open('http://www.jameco.com/webapp/wcs/stores/servlet/StoreCatalogDisplay?storeId=10001&catalogId=10001&langId=-1', function() {
    console.log('hopefully inside of www.jameco.com') ;
    console.log(page.framePlainText) ;
    phantom.exit()
});

Any help would be greatly appreciated.
Thanks
Reply all
Reply to author
Forward
0 new messages