TestProject Forum
Powered by leading experts in the test automation community

Selenium clicking WebElement error 'Element is not clickable at point'

When trying to click an item with WebElement.click() I get the following error : ‘Element is not clickable at point (526, 17)’
I am positive that my locator is good (located by Id)

Any idea why this happens ?

It seems like this problem only occurs in google chrome.

What you need to do is verify that the element is :

  1. present in the DOM
  2. visible in the UI
  3. Position is fixed (chrome)

There are a number of options to achieve this. you can read it here :

http://www.seleniumeasy.com/selenium-tutorials/element-is-not-clickable-at-point-selenium-webdriver-exception

The best solution in my opinion would be :

WebElement element = driver.findElement(By.id(""));
JavascriptExecutor js =(JavascriptExecutor)driver;
js.executeScript("window.scrollTo(0,"element.getLocation().y+")");
element.click();

This will locate the ‘Y’ position of your element beforehand, and thus ensure that you are able to click it.