嗨,我正在使用 Page Factory 将我的所有定位器保存在一个类中。
@FindBy(xpath="//select[@ng-model='selectedLeadSource']")
WebElement source_of_lead;
public Select getSourceOptions() {
return new Select(source_of_lead);
}
但我不能使用等待,因为它给我一个错误。
wait.until(ExpectedConditions.elementToBeClickable(onPage.getSourceOptions().selectByValue("Campaign")));
错误 :
ExpectedConditions 类型中的方法 elementToBeClickable(By) 不适用于参数(void)