at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote....
在javascript能够加载elementshref属性值之前,Selenium不需要等待就可以获取它。尝试显式地等待选择器,类似于: ( WebDriverWait(browser, 20) .until(EC.presence_of_element_located( (By.CSS_SELECTOR, "div.download-button-container a[href]"))) .click()) Reference: Selenium-等到元素出现,可见且可交互 ...