title: Selenium & PhantomJS error [Java]
body: <p>We are implementing functional tests with cucumber and selenium. Our front-end application is based on backbones and marionette. And when we run the tests with Chrome driver everything goes great. But when we change the driver and we use phantomjs, we get the folloging error:</p>
  
  <pre><code>[INFO  - 2016-05-25T07:29:25.974Z] GhostDriver - Main - running on port 25401
  [INFO  - 2016-05-25T07:29:26.585Z] Session [68fe2830-224a-11e6-8e2c-478b5c72f5db] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
  [INFO  - 2016-05-25T07:29:26.585Z] Session [68fe2830-224a-11e6-8e2c-478b5c72f5db] - page.customHeaders:  - {}
  [INFO  - 2016-05-25T07:29:26.585Z] Session [68fe2830-224a-11e6-8e2c-478b5c72f5db] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"windows-7-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"noProxy":null,"socksUsername":null,"httpProxy":"ALC-1DT2L12:49367","ftpProxy":null,"socksPassword":null,"sslProxy":"ALC-1DT2L12:49367","proxyAutoconfigUrl":null,"proxyType":"MANUAL","class":"org.openqa.selenium.Proxy","autodetect":false,"hCode":1261368293,"socksProxy":null}}
  [INFO  - 2016-05-25T07:29:26.585Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 68fe2830-224a-11e6-8e2c-478b5c72f5db
  [ERROR - 2016-05-25T07:29:48.721Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1464161388706
  
  phantomjs://platform/console++.js:263 in error
  [ERROR - 2016-05-25T07:29:49.511Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1464161389489
  </code></pre>
  
  <p>I took a screen capture from phantomjs and the screenshot was a white image. It's like phantomjs try to load the login url but nothing is displayed.</p>
  
  <p>We use the following dependencies:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
          &lt;version&gt;2.48.2&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;dependency&gt;
          &lt;groupId&gt;com.codeborne&lt;/groupId&gt;
          &lt;artifactId&gt;phantomjsdriver&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
                  &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;/exclusion&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
                  &lt;artifactId&gt;selenium-remote-driver&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>And the code where the test fails:</p>
  
  <pre><code>WebDriverWait espera = new WebDriverWait(getCurrentDriver(), 20);
  espera.until(ExpectedConditions.elementToBeClickable(By.cssSelector("#userLogin")));
  </code></pre>
  
  <p>Thanks in advance.</p>