请问老师怎么提示该元素不能点击
来源:8-6 遍历课程实战-2

0_菇凉将我作甚_0
2019-01-14
掌握React源码,让你的开发水平没有上限,更不惧前端未来的到来!
is not clickable at point (160, 739) @Test public void courseList(){ driver.getUrl("https://coding.imooc.com/");
List<String> stringList=this.listElement();
for(int i=0;i<stringList.size();i++){
driver.findElement(By.xpath("//*[contains(text(),'"+stringList.get(i)+"')]")).click();
driver.back();
}
}
public List<String> listElement(){
List<String> stringList=new ArrayList();
WebElement element=driver.findElement(By.className("shizhan-course-list"));
List<WebElement> listElement=element.findElements(By.className("shizhan-course-box"));
for(WebElement el:listElement){
stringList.add((el.findElement(By.className("shizan-desc")).getText()));
}
return stringList;
}
写回答
1回答
-
Mushishi
2019-01-14
你好,你把这个课程名字拿到网页dom中去对比看一下,是否一样,而且你的是否找到但是无法点击?如果找到无法点击看一下是不是页面有其他蒙层挡住
032019-01-21
相似问题