WebDriver - element is not clickable Chrome WebDriver - element is not clickable Chrome selenium selenium

WebDriver - element is not clickable Chrome


I am assuming that you have the correct element you need, ie the XPath is correct.Here are few ways out:

  1. Try to Click on the parent element instead.
  2. Try .Submit() instead of .Click()
  3. Try to execute the JavaScript that will be executed on the OnClick event of the element you are trying to click.

I have used the 3rd way with success all the time.

Another one

  1. Do a .SendKeys(Keys.Enter) on that element (or a Space key)


Since you've tagged the question as Google-Chrome too - I suppose that this is happening mostly with ChromeDriver. I had the same issues with one of my previous projects (Asp .Net MVC). I found that when some elements are not visible for this Driver if they are not in the screen_visible_area. Please note that they are loaded (HTML, CSS3, JS etc.) properly.

So after a lot of reading and testing, I found that my workaround is simply scroll to the WebElement - so it is in the visible part of the screen. Actually this issue was not for all elements and I didn't find better solution for it.

unknown error: Element is not clickable at point (..., ...) 

Is not descriptive error for this case, because like you I also thought that is Selector-related.

Just to be full answer - I had the same problems with IEDriver too. My implementation was to use the Browser scroll down/up options and just "send the screen" where the problematic element is.

Simple JSExecutor code that you can use:

WebDriver driver = new FirefoxDriver();JavascriptExecutor jse = (JavascriptExecutor)driver;jse.executeScript("window.scrollBy(110,350)", "");

or

jse.executeScript("scroll(0, 250);");

or

driver.executeScript("window.scrollBy(110,350)", "");

Other topic-related useful resources are here.

Update

When it comes to the .sendKeys() I also used the browser accessibility features. All you need to do is just count how many TAB clicks your test need in order to get to the targeted web_element. Then just call .click().

Try this simple code:

element.sendKeys(Keys.TAB);

or

element.sendKeys("\t")

or

Actions builder = new Actions(driver);builder.keyDown(Keys.TAB).perform()


I realize this is a super old question, but it came up while searching a nearly identical problem in the present day. After attempting many of the fixes described here and getting new exceptions for my trouble (mostly stale element and http request timeouts) I stumbled across this issue on Selenium's GitHub.

As described in the post, Chrome had advanced beyond the abilities of my version of chromedriver.exe--my v2.30 driver had known issues with clicking elements due to changes in Chrome v61 scrolling mechanics. Updating to the latest chromedriver.exe solved all my problems.

tl/dr: ensure your version of chromedriver is compatible with the version of Chrome being tested.