How to fix “Element is not clickable” in Selenium WebDriver tests?

Three ways to resolve the “Element is not clickable” issue in Selenium.

Courtney Zhan
3 min readJul 3, 2022

--

Element is not clickable” is a common error that Selenium test automation engineers often encounter. This might be applicable to other test automation frameworks, with different error messages. There are possible two causes:

  1. The element is not clickable, such as disabled or not allowed to click by nature (e.g. a hidden field)
    this is easy to find out by inspecting (via right-click in Chrome), the solution is to change/refine the locator.
  2. The element is not viewable in the browser (by the definition of Selenium)

This article will explain the second type. Below is a test failure of trying to click the exclamation icon.

The test failed (the above: webpage, the below test failure output)

Tip: run the test and keep the browser open so that you can inspect the web page, test scripts and test output all-together. Check out: Keep the Browser Open after Executing an Individual Test.

Analyse

The test step:

driver.find_element(:class…

--

--