java在BDD步骤定义中使用显式等待条件调用页面工厂元素?
我已在page factory中声明此webElement,如下所示: 假设我在下一个类中拥有调用元素的所有必备条件
@FindBy (xpath="//span[contains(text(),'UAE')]")
WebElement ChangedCountry1;
public WebElement CountryChange()
{
return CountryChange;
}
现在在另一个类中,如果我想使用类似这样的东西来尝试显式等待。是否可以通过显式等待来具体实现这一点&;寻呼工厂
WebDriverWait wait = new WebDriverWait(driver,20);
wait.until(ExpectedConditions.visibilityOfElementLocated(<object>.CountryChange()));
共 (0) 个答案