title: TypeError: By.cssSelector is not a function
body: <p>I'm using <a href="https://www.npmjs.com/package/selenium-webdriver" rel="noreferrer">npm's Selenium Webdriver.</a></p>
  
  <p>I can't make the <code>By.cssSelector</code> work. Everything else does: <code>By.tagName</code>, <code>By.id</code>, etc.</p>
  
  <p>Code:</p>
  
  <pre><code>var webdriver = require('selenium-webdriver'),
      By = require('selenium-webdriver').By,
      until = require('selenium-webdriver').until
  
  var driver = new webdriver.Builder()
      .forBrowser('firefox')
      .build()
  
  driver.get('http://www.facebook.com/')
  driver.findElement(By.name('email')).sendKeys('xxx@gmail.com')
  driver.findElement(By.name('pass')).sendKeys('xxx')
  driver.findElement(By.id('pass')).submit()
  
  driver.findElement(By.name('xhpc_message')).sendKeys('https://www.youtube.com/watch?v=UfvZvd-kjyo')
  
  driver.wait(function () {
    return driver.isElementPresent(driver.findElement(By.cssSelector(".uiScaledImageContainer")))
  }, 10000)
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>alex@alex-K43U:~/node/sapp$ node app.js
    /home/alex/node/sapp/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:41
    goog.global.setTimeout(function() { throw exception; }, 0);
                                          ^</p>
    
    <p>TypeError: By.cssSelector is not a function</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>