title: How to wait for an Ajax call working on populating a drop down list in Selenium
body: <p>Ok so I have two drop down lists. <em>List B</em> populates based on the selection made on <em>List A</em> using the Ajax technology. </p>
  
  <p>Now the problem is that once I select an option form <em>List A</em>, I am not able to see the <em>List B</em> populated as Ajax is taking a lot of time to load. I want to know how to use the Wait condition in this scenario to give Ajax enough time to Load. I am a beginner so I am sorry if my question sounds stupid. But I am really stuck at this for long.</p>
  
  <p>I can't use:</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(driver,30);
  wait.until(ExpectedConditions.visibilityOfElementLocated(By.id/xpath)));
  </code></pre>
  
  <p>because the id, <code>xpath</code> etc remains the same always, even when the list is not populated.</p>