我已经尝试使用driver.find_element_by_id // link_text //部分链接文本,我应该使用什么来访问此href。我得到了No the异常。任何帮助都将非常感谢tysm。
<a href="../s-reminderNotice.asp?fname=b%2D3c%2DpLessonBooking%2Easp%3Flimit%3Dpl"
class="sidelinkbold" target="mainFrame" onmouseover="
window.status='Practical Training Booking'; return true" onmouseout="window.status=' ';
return true">Booking without Fixed Instructor</a>已解决;元素在IFRAME中;必须将框架切换到ACCESS元素
发布于 2021-03-24 13:09:59
尝试使用:
webDriver.findElement(By.xpath("//a[@href='YOUR LINK']")).click();发布于 2021-03-24 12:55:52
尝试使用以下WebElement,然后单击它:
//a[contains(text(),'Booking without Fixed Instructor')]发布于 2021-03-24 13:00:45
driver.find_element_by_class_name("sidelinkbold").click()它有一个简单的类名,你可以用它来点击。
https://stackoverflow.com/questions/66774846
复制相似问题