selenium在前台运行是正常的,但在后台静默运行就报错:selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
出错的代码是在菜单定位下,该菜单需要鼠标悬浮才能出现:
menu = browser.find_element_by_xpath('//*[@id="9903000000"]')
time.sleep(2)
ActionChains(browser).move_to_element(menu).perform()
browser.find_element_by_id('9903010400').click()
请各位大侠指导怎么弄才能保证 后台运行,谢谢。