title: Selenium with PhantomJs and NodeJs
body: <p>i created a project with Express, and now i try to run selenium code with Phantomjs.</p>
  
  <p>I have:</p>
  
  <pre><code>var app = express();
  
  var webdriver = require('selenium-webdriver');
  
  var driver = new webdriver.Builder().
     withCapabilities(webdriver.Capabilities.phantomjs()).
     build();
  </code></pre>
  
  <p>but when i try to run i have this error:</p>
  
  <pre><code>path/node_modules/selenium-webdriver/phantomjs.js:72
      throw Error(
            ^
  Error: The PhantomJS executable could not be found on the current PATH. Please download the latest version from http://phantomjs.org/download.html and ensure it can be found on your PATH. For more information, see https://github.com/ariya/phantomjs/wiki
      at Error (&lt;anonymous&gt;)
      at findExecutable (/home/antonio/node_modules/selenium-webdriver/phantomjs.js:72:11)
      at Object.createDriver (/home/antonio/node_modules/selenium-webdriver/phantomjs.js:108:13)
      at createNativeDriver (/home/antonio/node_modules/selenium-webdriver/builder.js:43:24)
      at Builder.build (/home/antonio/node_modules/selenium-webdriver/builder.js:96:18)
      at Object.&lt;anonymous&gt; (/home/antonio/projectNode/ExpressProject/app.js:18:4)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
  </code></pre>