有人能告诉我如何使用pagefactory对web元素集合使用显式等待吗?
[FindsBy(How = How.ClassName, Using = "tree-item-content")]
public IList<IWebElement> TreeItems { get; set; }
这解决了我的问题,如果这不是解决问题的好方法,请告诉我
WebDriverWait wait = new WebDriverWait(Driver.WebDriver,TimeSpan.FromSeconds(20));
wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(new ReadOnlyCollection<IWebElement>(TreeItems)));