我试图点击此page上的所有课程链接,但这给了我这个错误:
Message: element click intercepted: Element <h2>...</h2> is not clickable at point (614, 20). Other element would receive the click: <a aria-label="Current ..." href="/current/">Students</a>
这是我的代码:
driver = webdriver.Chrome()
driver.get("https://www.mtu.edu/data-science/programs/masters/incoming-students/")
wait = WebDriverWait(driver, 20)
links = driver.find_elements_by_css_selector("div.bar.accordian-title>h2")
for link in links:
wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div.bar.accordian-title>h2")))
link.click()
time.sleep(3)
有人知道如何解决此问题吗?预先感谢!