ElementClickInterceptedException


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

xpath_merchart = '//div[text()="孔华生"]/../..'#直接查找元素会上报ElementClickInterceptedException,原因是此元素不可点击
gbl.driver.click(xpath_merchart)
xpath_confirm = '//div[text()="确认"]/../..'
gbl.driver.find_elements(xpath_confirm).click()

相关