title: Selenium cannot find element
body: <p>Having some issues using Selenium web driver in Chrome.</p>
  
  <p>My goal is to give the user ~15-30 seconds to log in on there own and then start doing automated testing.</p>
  
  <p>The problem is after I click the login button and go to the next page, I am not able to find elements by xpath, id, etc.</p>
  
  <pre><code>public static void runTest() throws InterruptedException {
  
      System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+"/chromedriver");
      WebDriver driver = new ChromeDriver();
      driver.get("http://www.url.com");
      driver.manage().window().maximize();
      Thread.sleep(15000);
      driver.findElement(By.xpath("//*[@id=\"content-main\"]/div/div/form/div/p/input")).click();
  
      System.out.println("User has logged in and it has found element for Attachment Upload.");
      Thread.sleep(15000);
  
      driver.findElement(By.xpath("//*[@id=\"invoiceMenu\"]/a")).click();
  }
  </code></pre>
  
  <p>I have also tried using explicit waits and have had no luck for example:</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver, 10);
  WebElement element = wait.until(
      ExpectedConditions.visibilityOfElementLocated(By.id("someid")));
  </code></pre>
  
  <p>The error I am usually getting back is: </p>
  
  <pre><code>Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //*[@id="invoiceMenu"]/a (tried for 10 second(s) with 500 milliseconds interval)
  </code></pre>
  
  <p>Edit:</p>
  
  <p>Was able to get some of the elements (angular ones) working with a few plugins for Chrome. Element Locator and ChroPath worked fantastic. Took some playing around with, but once I got one I was able to piece together the rest of them.</p>