title: PhantomJS: How To Handle redirected URls like https?
body: <p>I am trying do Head less Testing with PhantomJS Driver. Problem is : Unable to work on redirected URLS ex URL : <a href="https://gmail.com" rel="nofollow">https://gmail.com</a>    </p>
  
  <p>Environment : <strong>phantomjs-1.9.7-windows</strong> ; <strong>phantomjsdriver: 1.0.4</strong> ; <strong>junit :4.8.1</strong> ; <strong>selenium-server : 2.39.0</strong>                </p>
  
  <p>Console:</p>
  
  <pre><code>Feb 4, 2014 4:42:34 AM org.openqa.selenium.phantomjs.PhantomJSDriverService &lt;init&gt;
  INFO: executable: C:\Users\xprk067\softwares\phantomjs-1.9.7-windows\phantomjs.exe
  Feb 4, 2014 4:42:34 AM org.openqa.selenium.phantomjs.PhantomJSDriverService &lt;init&gt;
  INFO: port: 7070
  Feb 4, 2014 4:42:34 AM org.openqa.selenium.phantomjs.PhantomJSDriverService &lt;init&gt;
  INFO: arguments: [--webdriver=7070]
  Feb 4, 2014 4:42:34 AM org.openqa.selenium.phantomjs.PhantomJSDriverService &lt;init&gt;
  INFO: environment: {}
  PhantomJS is launching GhostDriver...
  [ERROR - 2014-02-04T10:42:34.998Z] GhostDriver - main.fail - {"message":"Could not start Ghost Driver","line":82,"sourceId":79376088,"sourceURL":":/ghostdriver/main.js","stack":"Error: Could not start Ghost Driver\n    at :/ghostdriver/main.js:82","stackArray":[{"sourceURL":":/ghostdriver/main.js","line":82}]}
  OUTPUT:blank
  </code></pre>
  
  <p>here is the code which i have used</p>
  
  <pre><code>public class PhantamJS{
  
      private WebDriver driver;
      private WebDriver driver2;
  
      @Test
      public void  test(){                        
  
          **PhantomJSDriver to get the current URL  : Not Working**       
          Proxy proxy = new Proxy();
          PhantomJSDriverService driverService = new PhantomJSDriverService.Builder()
          .usingPhantomJSExecutable(new File("C:\\Users\\amar\\softwares\\phantomjs-1.9.7-windows\\phantomjs.exe"))
          .usingPort(7070)
          .build();
          final DesiredCapabilities capabilities = new DesiredCapabilities();
          capabilities.setCapability(CapabilityType.PROXY, proxy);
          driver2 = new PhantomJSDriver(driverService, capabilities);
          driver2.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
          driver2.get("https://gmail.com");           
          String currentURL2 = driver2.getCurrentUrl();             
  System.out.println("OUTPUT" + currentURL2 );
      }
  }
  </code></pre>