in reply to Re: WWW::Mechanize::PhantomJS - can't exec "phantomjs"
in thread WWW::Mechanize::PhantomJS - can't exec "phantomjs"

Thanks - I didn't read the page closely enough and assumed cpan would take care of all dependencies. NEW ISSUE: Rather than make a new post, I'll just add this one: After downloading phantomjs.exe and pointing to it in my test program above using this line:
my $mech = WWW::Mechanize::PhantomJS->new(launch_exe => "/home/user1/p +hantomjs.exe");

I now receive the following error when I try to run it:


Can't open '/usr/lib/perl5/site_perl/5.14/WWW/Mechanize/PhantomJS/ghos +tdriver/main.js' Selenium server did not return proper status at (eval 82) line 61.

Any ideas on this one? The main.js file referenced in the message does exist.

Replies are listed 'Best First'.
Re^3: WWW::Mechanize::PhantomJS - can't exec "phantomjs"
by Anonymous Monk on Sep 13, 2014 at 07:00 UTC
      No, what I am saying is that the file referenced in the error message:
      '/usr/lib/perl5/site_perl/5.14/WWW/Mechanize/PhantomJS/ghos +tdriver/main.js'

      already does exist - it was put there when I installed WWW::Mechanize::PhantomJS. The question is: why is PhantomJS unable to open it?

        The error message did not say the file was missing.

        Rather it said : Selenium server did not return proper status at (eval 82) line 61.
        (Emphasis is mine)

        Selenium is known to have issues with popup messages (or so I've heard - no personal experience with it).
        You probably need to dig into Selenium logs to see what it did not like.

                "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams