我正在尝试使用python selenium自动化一个网站
# ----- click on the sign up popup
popup = driver.find_element_by_xpath("/html/body/div[1]/div[4]/section[1]/div/div/div[2]/div/p/a")
popup.click()
单击工作正常,弹出消息显示完美。但在那之后,我得到了这个错误:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a href="#mailmunch-pop-940306" class="btn-link btn-auto btn-intro btn-primary">...</a> is not clickable at point (1263, 589). Other element would receive the click: <div class="mailmunch-inner-overlay" id="mailmunch-inner-overlay-178218df563cebd"></div>
(Session info: chrome=89.0.4389.82)
代码停止工作。我能做什么? 请帮忙
在您尝试从弹出窗口中查找元素后,是否会收到所述错误?所以产生错误的不是你所想的那条线。如果是这种情况,那么当您尝试(例如)单击该弹出窗口中的某个内容时,请尝试以下操作:
您需要导入:
尝试调用直接单击元素,使其绕过覆盖或单击其关闭按钮
你需要去掉覆盖层。没有HTML,我只能提供几个解决方案:
相关问题 更多 >
编程相关推荐