搜索
您的当前位置:首页正文

Selenium Webdriver : Element not found in the cache - perhaps the page has changed since it

来源:易榕旅网

可以写这样的方法,先找到这个元素,再点击

public void clickAnElementByLinkText(String linkText) {
    wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(linkText)));
    driver.findElement(By.linkText(linkText)).click();
}
然后调用

clickAnElementByLinkText("文字");
 

可参考


因篇幅问题不能全部显示,请点此查看更多更全内容

Top