Debugging “Element is not clickable at point” error

后端 未结 30 2171
余生分开走
余生分开走 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:15

    I was also stuck for two days because of the same reason, actually Scrolling will make it work, because may be the data couldn't load properly, which may cause the same error again and again.

    What I did is, I scroll down randomly, once with (0,-500), then (0,400), then (0.-600), you may give these scroll value according to your use. Just scroll it where you have the content to click.

    driver.execute_script("scrollBy(0,-500);")
    sleep(5)
    
    driver.execute_script("scrollBy(0,400);")
    sleep(5)
    
    driver.execute_script("scrollBy(0,-600);")
    sleep(5)
    

    It really worked :)

提交回复
热议问题