Debugging “Element is not clickable at point” error

后端 未结 30 2172
余生分开走
余生分开走 2020-11-21 23:55

I see this only in Chrome.

The full error message reads:

\"org.openqa.selenium.WebDriverException: Element is not clickable at point (411, 675

30条回答
  •  时光取名叫无心
    2020-11-22 00:39

    Maybe it's not really clean solution but it works:

    try:
        el.click()
    except WebDriverException as e:
        if 'Element is not clickable at point' in e.msg:
            self.browser.execute_script(
                '$("{sel}").click()'.format(sel=el_selector)
            )
        else:
            raise
    

提交回复
热议问题