0
能否請你幫我找到在下面的代碼鏈接Taschen
找到鏈接?無法使用硒網絡驅動程序
代碼:
<a data-flyout-target="handbags" title="Taschen" href="#">Taschen</a>
能否請你幫我找到在下面的代碼鏈接Taschen
找到鏈接?無法使用硒網絡驅動程序
代碼:
<a data-flyout-target="handbags" title="Taschen" href="#">Taschen</a>
有多種方法,通過它可以識別該鏈接: -
Xpath: -
//a[text()='Taschen']
//a[@data-flyout-target = 'handbags']
//a[@title='Taschen']
所以你可以使用driver
對象像識別它: -
driver.findElement(By.xpath("Put any of the above xpaths"));
或使用連結文字
driver.findElement(By.linkText("Taschen"));
希望它能幫助!