【发布时间】:2014-05-20 12:27:54
【问题描述】:
我在 java 中使用 selenium web 驱动程序。我想单击名称为下载的链接。 实际上有四个同名的链接。当我检查我得到的元素时
<a href="http://selenium-release.storage.googleapis.com/2.41/selenium-java-2.41.0.zip"></a>
我正在尝试点击以下链接
driver.findElement(By.xpath("//a[@ href='//http://selenium-release.storage.googleapis.com/2.41/selenium-java-2.41.0.zip']")).click();
在以下链接中,我尝试单击第一个下载链接。 Selenium Download
点击不工作。谁能告诉我如何点击这个特定的链接?
提前致谢。
【问题讨论】: