wait.until(ExpectedConditions)
に2つの要素を使用します。 私はテストを実行しており、Element1またはElement2のいずれかが表示されるまで待つためには、WebDriver
が必要です。それから、私は最初に登場する人を選ぶ必要があります。私が試した:wait.until(ExpectedConditions.visibilityOf Element1 OR Element2)
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();
を要約すると、私は2つの要素のいずれかが表示されるまで待つ必要があります。表示されている人を選んでください(同時に表示されません) 助けてください。
掻き回し、私たちは:-) –
Tak tochno !!!!! –
попробуй[Watir](http://watirwebdriver.com/)^ _^ –