element click intercepted

driver.find_element_by_css_selector(".ui-btn-primary").click()

确定了定位没有问题,但是运行的时候点不到,报错信息是"error":"element click intercepted","message":"element click intercepted

改成js点击即可运行

ele = driver.find_element_by_css_selector(".ui-btn-primary")
driver.execute_script("arguments[0].click();", ele)
posted @ 2022-01-07 10:14  OTAKU_nicole  阅读(531)  评论(0编辑  收藏  举报