ElementClickInterceptedException

当查找元素点击时上报ElementClickInterceptedException,原因是此元素是不可点击的,此时查找其父元素进行点击

xpath_merchart = '//div[text()="孔华生"]/../..'#直接查找元素会上报ElementClickInterceptedException,原因是此元素不可点击
gbl.driver.click(xpath_merchart)
xpath_confirm = '//div[text()="确认"]/../..'
gbl.driver.find_elements(xpath_confirm).click()
posted @ 2022-04-16 16:52  GalaxyStar  阅读(160)  评论(0编辑  收藏  举报