Selenium Wait for anyone of Element to visible
You can use or
expected conditions for that
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.or(
ExpectedConditions.visibilityOfElementLocated(By.id("id1")),
ExpectedConditions.visibilityOfElementLocated(By.id("id2"))
));
Or use cssSelector
or ,
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#id1, #id2"));