Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

PhantomJS 2.1.2 + submitHome() window.location #20

Open
iokevins opened this issue Aug 9, 2016 · 1 comment
Open

PhantomJS 2.1.2 + submitHome() window.location #20

iokevins opened this issue Aug 9, 2016 · 1 comment

Comments

@iokevins
Copy link

iokevins commented Aug 9, 2016

Running Debian Stretch and getting this error:

$ phantomjs ge-cancellation-checker.phantom.js -v
Please wait...
On GOES login page...
Logging in...
Bypassing human check...
Not allowed to load local resource: file://ge-cancellation-checker.phantom.js/goes/HomePagePreAction.do

This seems related to PhantomJS failing to handle the call to submitHome(), which represents a function which calls:

function submitHome( ) {
window.location = "/goes/HomePagePreAction.do";
}

The call to window.location seems to fail, on my build, with PhantomJS 2.1.2, with the error, above.

The solution, for me: edit file ge-cancellation-checker.phantom.js, commenting out submitHome() and manually calling window.location to the full URL:

98 function() { // Accept terms
99 page.evaluate(function() {
100
101 //submitHome();
102 window.location = "https://goes-app.cbp.dhs.gov/goes/HomePagePre Action.do";
103
104 console.log('Bypassing human check...');
105 });
106 },

Hope this helps someone else!

@mbgearhead
Copy link

I can confirm this issue using Ubuntu 16.04, PhantomJS 2.1.1. By calling:

window.location = "https://goes-app.cbp.dhs.gov/goes/HomePagePreAction.do";

I was able to get this script to work. Thank for the help and cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants