title: How do I access the text input value in selenium webdriver mocha tests
body: <p>Need help testing user interactions with mocha selenium webdriver. No idea where to find what the correct method is to get value of text input. Tried various variations on getAttribute(), getText etc. Get the same error: </p>
  
  <pre><code>TypeError: Object [object object] has no method 'getElementText'
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>var assert = require('assert'),
      fs = require('fs');
  
  var webdriver = require('../node_modules/selenium-webdriver'),
      test = require('../node_modules/selenium-webdriver/testing'),
      remote = require('../node_modules/selenium-webdriver/remote');
  
  
  test.describe('Google Search', function() {
    var driver;
  
    this.timeout(60000);
  
    test.before(function() {
      driver = new webdriver.Builder().
          withCapabilities(webdriver.Capabilities.chrome()).
          build();
    });
  
    test.it('should append query to title', function() {
  
      //setTimeout(done, 60000);
  
      driver.get('http://localhost:8080/devanagariTextField/index.html');
  
      driver.findElement(webdriver.By.id('textbox')).sendKeys('gaa');
      //driver.findElement(webdriver.By.name('btnG')).click();
      driver.wait(function() {
        return driver.getElementText('value').then(function(text) {
          console.log('TEXT: ' + text)
          return 'गा' === text;
        });
      }, 1000);
    });
  
    //test.after(function() { driver.quit(); });
  });
  </code></pre>