当我从Python脚本调用selenium webdriver时,我试图使用下面的命令在selenium webdriver中启用单击操作,以便选择5年、10年、15年按钮(而不是默认选择的3年按钮),但它给出了一个空白错误。我使用的命令是
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a#yr10mpt"))).click() 网页是:
performance.morningstar.com/funds/etf/ratings-risk.action?t=VDC 发布于 2020-10-13 13:26:58
让它和下面的代码一起工作。
elements=WebDriverWait(driver, 10).until(EC.presence_of_all_elements_located((By.XPATH, "//a[text()='10-Year']")))
for elem in elements:
elem.click()https://stackoverflow.com/questions/64328866
复制相似问题