title: Form elements not identifiable in TestNG
body: <p>I am new to selenium. I am trying to write a script to open an application,enter user name and Password and login. I tried doing the same using selenium IDE in firefox. Its working. But when I try the same using selenium and TestNG(JAVA) I am geting the below error : </p>
  
  <pre><code>    org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: /html/body/form[1]/div[2]/table[2]/tbody/tr[4]/td/button (tried for 10 second(s) with 500 MILLISECONDS interval)
      Build info: version: 'unknown', revision: '3169782', time: '2016-09-29 10:24:50 -0700'
  
      Driver info: org.openqa.selenium.ie.InternetExplorerDriver
      Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:9907/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
      Session ID: a36f7287-5912-48c0-87b2-3d974262c634
          at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
          at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:265)
          at com.nagest.nrt.NewTest.userLogin(NewTest.java:47)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  </code></pre>
  
  <p>The HTML Snippet of my page is : </p>
  
  <pre><code>                            &lt;table&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;User Id: &lt;/td&gt;
                                      &lt;td&gt;&lt;input type="text" name="USER" id="USER" onfocus="this.style.border='2px solid #3BB9FF';" onblur="this.style.border='2px solid #737373'" /&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;Password: &lt;/td&gt;
                                      &lt;td&gt;&lt;input type="password" name="PASSWORD" id="PASSWORD" onfocus="this.style.border='2px solid #3BB9FF';" onblur="this.style.border='2px solid #737373'" /&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;&lt;input type="hidden" name="TARGET" id="TARGET" value="/epsweb/view/private/search/search.jsf" /&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;&lt;button name="Logon" type="submit" onfocus="this.style.border='2px solid #3BB9FF';" onblur="this.style.border='2px solid #737373'"&gt;Logon&lt;/button&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
  </code></pre>
  
  <p>My TESTNG java code : </p>
  
  <pre><code>public void userLogin(){
          driver.get(baseURL + "login url");
          //driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
          //driver.findElement(By.id("USER")).sendKeys("aaa");
          waitVar.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"USER\"]"))).sendKeys("aaa");
         waitVar.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"PASSWORD\"]"))).sendKeys("123");;
      //  driver.findElement(By.name("USER")).sendKeys("aaa");
      //  driver.findElement(By.name("PASSWORD")).sendKeys("@123");
          waitVar.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("/html/body/form[1]/div[2]/table[2]/tbody/tr[4]/td/button"))).click();
          String strPageTitle = driver.getTitle();
  
      }
  </code></pre>
  
  <p>I tried using many combinations but now working. I even tried copying the code from firefox IDE and converted it to java. XPATH is am geting from firebug. </p>
  
  <p>Note : The form elements are visible before 10 seconds. </p>
  
  <p>Update : I tried with the below code </p>
  
  <pre><code> WebElement myelement=driver.findElement(By.id("USER"));
  String tag=myelement.getTagName();
          System.out.println("====================="+tag);// ===============input
          myelement.sendKeys("aaaa");
  </code></pre>
  
  <p>The sysout line is geting printed. But, when I use the sendKeys() method, it is throwing the exception. </p>
  
  <pre><code>    org.openqa.selenium.WebDriverException: Element is not displayed (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 234 milliseconds
  Driver info: org.openqa.selenium.ie.InternetExplorerDriver
  Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:13799/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
  Session ID: 1c79492b-0fab-497e-9866-cbba060f6c8a
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:636)
      at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:284)
  ...........
  </code></pre>
  
  <p><strong>This issue is occuring only in IE11. I tried in chrome it works correctly.</strong></p>