title: How to solve "waiting for visibility of element located by By.xpath" in the code?
body: <p>My Program has failed to locate the <code>pass-code</code> field which is in the next page of login page, so I have tried to locate it by a wait as follows (piece of code shows).</p>
  
  <p>I have already tried by increasing the wait time to 100, but it also not working.</p>
  
  <p>It shows as program stops in the password field even without reaching to the <code>sing-in</code> button.</p>
  
  <p>An error received as :</p>
  
  <blockquote>
    <p>org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //input[@id='user-passcode'] (tried for 10 second(s) with 500 milliseconds interval)at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)</p>
  </blockquote>
  
  <p>It always shows as it fails in 81 wherever the code...</p>
  
  <pre><code>WebElement unfield = driver.findElement(By.xpath("//input[@id='user-name']"));
  Actions actions = new Actions(driver);
  actions.moveToElement(unfield).click();     
  unfield.clear();
  unfield.sendKeys("test");      
  driver.findElement(By.xpath("//input[@id='user-password']")).clear();
  driver.findElement(By.xpath("//input[@id='user-password']")).sendKeys("test");
  WebElement test = driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='SIGN IN'])[1]/following::button[1]"));
  Actions actions_signinclick = new Actions(driver);
  signinclick_buttonclick .moveToElement(test).click();
  //this will display in next page
  WebDriverWait wait = new WebDriverWait(driver, 10);
  wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//input[@id='user-passcode']")));
  driver.findElement(By.xpath("//input[@id='user-passcode']")).click();
  driver.findElement(By.xpath("//input[@id='user-passcode']")).clear();
  driver.findElement(By.xpath("//input[@id='user-passcode']")).sendKeys("1234");      
  WebDriverWait submit_button = new WebDriverWait(driver, 100);
  submit_button.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//BUTTON[@_ngcontent-wks-c3=''][text()='SUBMIT']/self::BUTTON")));
  driver.findElement(By.xpath("//BUTTON[@_ngcontent-wks-c3=''][text()='SUBMIT']/self::BUTTON")).click();
  </code></pre>
  
  <p>Please help me to find a solution for this.</p>