title: Why can i not enter text into a field in Selenium/HtmlUnit?
body: <p>Ok so i have been working on a program that can acces twitter via html unit/selenium drivers in java. This is part of a larger program i am trying to build. Regardless, I have succeced in getting the program to login to twitter with my account, and even getting it to search for other accounts but when i  try to tweet, i get an error message like this: </p>
  
  <pre><code>"Exception in thread "main" java.lang.UnsupportedOperationException: You may only set the value of elements that are input elements
  at org.openqa.selenium.htmlunit.HtmlUnitKeyboard.sendKeys(HtmlUnitKeyboard.java:82)
  at org.openqa.selenium.htmlunit.HtmlUnitWebElement.sendKeys(HtmlUnitWebElement.java:343)
  at javaapplication4.JavaApplication4.main(JavaApplication4.java:41)
  </code></pre>
  
  <p>Java Result: 1"</p>
  
  <p>Im not sure what the issue is. Here is my code:</p>
  
  <pre><code>WebDriver driver = new HtmlUnitDriver();
  
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  
    driver.get("https://twitter.com/login");
  
     System.out.println(driver.getCurrentUrl());
  
     WebElement element = driver.findElement(By.name("session[username_or_email]"));
  
  
   element.sendKeys("A*****K*****");
  
   WebElement pass = driver.findElement(By.name("session[password]"));
  pass.sendKeys("*******");
  pass.sendKeys(Keys.ENTER);
   System.out.println(driver.getCurrentUrl());
  
       WebElement tweet = driver.findElement(By.id("tweet-box-mini-home-profile"));
         tweet.click();
         WebElement tweet2 = driver.findElement(By.id("tweet-box-global-label"));
         tweet2.sendKeys("A");
          WebElement send = driver.findElement(By.className("btn primary-btn tweet-action tweet-btn js-tweet-btn"));
          send.click();
          driver.close();
  </code></pre>