セレンの webdriverwait メソッドを特定の IWebElement に適用して、この IWebElement の子要素が利用可能になったときにそれらを取得しています。これは私のコードです...
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
IList<IWebElement> elementsA = wait.Until<IList<IWebElement>>((d) =>
{
return driver.FindElements(By.XPath("//table[@class='boxVerde']"));
});
foreach (IWebElement iwe in elementsA)
{
wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
IList<IWebElement> elementsB = wait.Until<IList<IWebElement>>((d) =>
{
return iwe.FindElements(By.XPath("tr/td/div/a"));
//trying to fetch the anchor tags from the element
});
}
「要素がDOMにアタッチされていません」というエラーが表示され続けます...Webドライバーの待機が機能していないと思います。私は何か間違ったことをしていますか?よろしくお願いします