title: Error when using sendKeys() with Selenium WebDriver Java.lang.CharSequence cannot be resolved
body: <p>I have imported the following and still get an error when using <code>sendKeys();</code></p>
  
  <pre><code>import org.openqa.selenium.*;
  import org.openqa.selenium.firefox.*;
  import org.testng.Assert;
  import org.openqa.selenium.WebDriver;
  </code></pre>
  
  <p>Note: I am using Selenium WebDriver with Eclipse.</p>
  
  <p>The sample code is as below.</p>
  
  <pre><code>import org.openqa.selenium.*;
  import org.openqa.selenium.firefox.*;
  import org.testng.Assert;
  import org.openqa.selenium.WebDriver;
  
  public class Practice {
  
      public static void main(String[] args)
        {
  
          WebDriver driver = new FirefoxDriver();
          String baseUrl = "http://www.facebook.com";
  
          String tagName="";
          driver.get(baseUrl);
          tagName = driver.findElement(By.id("email")).getTagName();
          System.out.println("TagName: "+tagName);    
          WebElement myElement = driver.findElement(By.id("username"));
          myElement.sendKeys("text");
        }
  }
  </code></pre>
  
  <p>I received an error stating</p>
  
  <pre><code>The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
  </code></pre>
  
  <p>Pointing at the line <code>myElement.sendKeys("text");</code></p>
  
  <p>Can one of you let me know what is incorrect here.</p>