title: wait.until(ExpectedConditions.visibilityOf Element1 OR Element2)
body: <p>I want use <code>wait.until(ExpectedConditions)</code> with TWO elements.
  I am running a test, and I need <code>WebDriver</code> to wait until either of <strong>Element1 OR Element2</strong> shows up. Then I need to pick whoever shows up first. I've tried:</p>
  
  
  
  <pre class="lang-java prettyprint-override"><code>WebDriverWait wait = new WebDriverWait(driver, 60); 
      wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//h2[@class='....']"))) || wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//h3[@class='... ']"))); 
  
          // Then I would need:
  
  String result = driver.findElement(By.xpath("...")).getText() || driver.findElement(By.xpath("...")).getText();
  </code></pre>
  
  <p>To sum up, I need to wait until either of the TWO elements shows up. Then pick whoever shows up (they cannot show up simultaneously)
  Please Help.</p>