【发布时间】:2018-08-14 16:58:43
【问题描述】:
你好,我是java新手,Eclipse给我一个错误:
The type of the expression must be an array type but it resolved to By
下面是我的代码:
public boolean currentMonthActivity(){
selectSecondMonth.click();
return Driver.findElements(By.xpath("//div[contains(@class,'ng-binding')]")[1]).size () > 0;
}
【问题讨论】:
-
By.xpath返回什么?显然它不是一个数组。