该表在首次打开时加载数据,我创建了一个方法来获取随机数据并进行搜索,清除旧数据需要时间,然后显示“无结果”,然后加载新的搜索结果,该表的第一行始终可见的原因,它会显示“ No Result”一段时间,然后在数据加载后显示所有行,如何执行等待,等待数据清除然后等待新数据加载我尝试使用下面的代码,但即使在加载所有元素后仍要等待]
public void waitForSearchResult()
{
var wait = new WebDriverWait(Driver, new TimeSpan(0, 1, 0));
wait.IgnoreExceptionTypes(typeof(NoSuchElementException));
try
{
wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.VisibilityOfAllElementsLocatedBy(Driver.FindElements(By.XPath("//manual-map-bddl-list//tbody/tr"))));
}
catch (Exception )
{
}
我会尝试使用像这样的等待: