掌握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;
}