我有这段代码
<a href="/iot/apply/device.do" id="subMenu1" class="fortification55"
onclick="$('#deviceinfo').hide()">Apply</a>
我正在尝试使用 href 链接
getDriver().findElement(By.name("subMenu1")).click();
但我得到了这个错误
org.openqa.selenium.NoSuchElementException: Unable to find element with name == subMenu1 (WARNING: The server did not provide any stacktrace information)