如何使用Python在页面上找到此元素?
xlink:href="/assets/images/add.4dcdff54.svg"
谢谢。
我对 Python 或 XLink 不太好,但如果你想找到一个有锚标签的元素,请使用:
String path = "//a [@href='page_name.php']";
WebElement navbar = (new WebDriverWait(m_driver, 10))
.until(ExpectedConditions.elementToBeClickable(By.xpath(path)));
上面的代码是用Java编写的,如果有人可以编辑它并为Python编写等效的代码,那就太好了。