部分代码:
driver.find_element_by_css_selector('#main-menu > li.active-menuitem li:nth-child(9) span:nth-child(1)').click()
报错:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (89, 673)
原因:
可能是元素定位相互覆盖
解决:
将这部分代码改为:
element1 = driver.find_element_by_css_selector('#main-menu > li.active-menuitem li:nth-child(9) span:nth-child(1)')
driver.execute_script("arguments[0].click();", element1)