2017-06-16 14 views
0

使用我應該在下面的超鏈接中使用哪個屬性來查找元素?

By.id("aaabICLL.AreaViewStatic.ServiceLink17"), By.className("urLnkFunction"),Xpath, linkText("Serviceman Basic Report") 

而對於這些遇到這個錯誤的嘗試:

NoSuchElementException.eclipse is unable to locate the "Serviceman Basic Report" hyperlink. 

軍人基本報表

+0

wheres the HTML? –

+0

Webportal ....使用Chrome瀏覽器 –

+0

可以粘貼DOM嗎? –

回答

0

您可以使用下面的XPath對於您的情況:

driver.findElement(By.xpath("//*[contains(text(),'Serviceman Basic Report')]")).click(); 

希望我t會幫助你。

相關問題