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"));
希望它能帮助!