The following script works for me and prints what could well be the Google home page:
use strict;
use WWW::Mechanize::PhantomJS;
use Data::Dumper;
my $mech = WWW::Mechanize::PhantomJS->new();
$mech->get('http://google.com');
print Dumper $mech->content();
As there are many moving parts in your configuration, let's go through them:
- You say you installed PhantomJS after installing WWW::Mechanize::PhantomJS. This means that the test suite of the module could not actually check whether it can run a phantomjs executable. This is inconvenient. Please check that a phantomjs executable is actually visible in your PATH by opening a command line window and typing phantomjs in there. Please also tell us the version of the PhantomJS executable that is found and run.
- You are using a HTTP connection for a HTTPS proxy. Are you sure that the proxy is at the given address and that PhantomJS is happy with using a HTTPS proxy over HTTP? Can you run a test without needing a proxy?
- What versions of the modules (WWW::Mechanize::Firefox, Selenium::Remote::Driver) do you use?