How to resolve this error Element not interactable Any solution

0 votes

Nov 22, 2020 in Selenium by faha
• 360 points

Hello @ faha,

Could you please paste your snipper or code so that we can help you out? Your screenshot is not visible!!

package day16;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;

import org.openqa.selenium.Keys;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;





public class ExplicitWaitDemo {

public static void main(String[] args) throws InterruptedException {


ChromeDriver driver =new ChromeDriver();



WebDriverWait mywait=new WebDriverWait(driver,40);



 WebElement ele=mywait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[contains(text(),'SeleniumHQ Browser Automation')]")));;

// driver.findElement(By.xpath("//span[contains(text(),'SeleniumHQ Browser Automation')]")).click();


Console window


Starting ChromeDriver 86.0.4240.22 (398b0743353ff36fb1b82468f63a3a93b4e2e89e-refs/branch-heads/4240@{#378}) on port 5259

Only local connections are allowed.

Please see for suggestions on keeping ChromeDriver safe.

ChromeDriver was started successfully.

[1606143653.885][WARNING]: This version of ChromeDriver has not been tested with Chrome version 87.

Nov 23, 2020 9:00:55 AM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: W3C

Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable

  (Session info: chrome=87.0.4280.66)

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'

System info: host: 'DESKTOP-D0DRPFI', ip: '', 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.1'

Driver info:

Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 87.0.4280.66, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: C:\Users\mailf\AppData\Loca...}, goog:chromeOptions: {debuggerAddress: localhost:56861}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true}

Session ID: 36b74c451bf517dcd2dec9903c12e620

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(

at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(

at java.base/java.lang.reflect.Constructor.newInstance(

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(

at org.openqa.selenium.remote.HttpCommandExecutor.execute(

at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(

at org.openqa.selenium.remote.RemoteWebDriver.execute(

at org.openqa.selenium.remote.RemoteWebElement.execute(

at org.openqa.selenium.remote.RemoteWebElement.sendKeys(

at day16.ExplicitWaitDemo.main(


1 answer to this question.

0 votes

Hi, @Faha,

ElementNotInteractableException: Element is not reachable by keyboard

Element is not reachable by keyboard in plain words means that the element can’t be reached using the keyboard, which means you won't physically interact with it even.


There can be multiple reasons behind the error Element is not reachable by keyboard which can be either of the following:

  • The element is hidden as modern JavaScript-centric UI styles always keep the ugly raw HTML input field hidden. The hidden attribute could have been implemented through either of the following ways:
    • temporary overlay of some other element over the desired element.
    • permanent overlay of some other element over the desired element.
    • Presence of attributes e.g. class="ng-hide"style="display: none", etc
    • As per best practices while sending character sequence, you must not attempt to invoke click() or sendKeys() on any <p> or <div> tag, instead invoke click() on the desired <input> tag following the Official locator strategies for the webdriver.


There are different approaches to address this issue.

  • Incase of temporary overlay use WebDriverWait inconjunction with ExpectedConditions for the desired element to be visible/clickable as follows:

    new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.cssSelector("button.nsg-button"))).click();
  • In case of permanent overlay use executeScript() method from JavascriptExecutor interface as follows:

    import org.openqa.selenium.JavascriptExecutor;
    String inputText = "Rozmeen";
    WebElement myElement = driver.findElement("u_0_b"));
    String js = "arguments[0].setAttribute('value','"+inputText+"')"
    ((JavascriptExecutor) driver).executeScript(js, myElement);
answered Nov 24, 2020 by Gitika
• 65,930 points
Ok from where did u get this element?

Hey Gitika

any <p> or <div> tag

I'm  familiar with <div> tags but not with these <p> . By not using these tags to bel clicked.

Invoking desired input<tag>. Can you give any example for it?

What exactly are the official locator strategies of webdriver. Are they using xpath or chropath for every element?

I used temporary overlay method but its giving an error.

import org.openqa.selenium.By;

import org.openqa.selenium.Keys;




public class ExplicitWati2 {

public static void main(String[] args) {


ChromeDriver driver =new ChromeDriver();





new WebDriverWait.Until(ExpectedConditions.elementToBeClickable(By.cssSelector(button.nsg-button))).click();

Hello, @Faha,

Regarding your detailed query issue, we will get back you within a few hours, do cooperate with us, and in the meantime if it possible from your end to resolve the issue do mention here!!

Hey, @faha,

Regarding your previous issue, I would suggest you look at this

Related Questions In Selenium

0 votes
1 answer

How to eliminate this error”Cannot instantiate the type Select in selenium webdriver”

Try below code. Select sc = new Select(driver.findElement(By.xpath("your ...READ MORE

answered May 18, 2018 in Selenium by Samarpit
• 5,890 points
0 votes
1 answer

How to resolve Pycharm Referenced Error with Import Selenium Web driver?

Below will help: Pycharm > Preferences > Project ...READ MORE

answered Jun 26, 2018 in Selenium by Samarpit
• 5,890 points
+1 vote
2 answers
0 votes
0 answers

How to hover element when action class is not working in my Selenium framework ?

When i am writing the code to ...READ MORE

Feb 15, 2019 in Selenium by Raishul
0 votes
1 answer

Getting error while run the selenium scripts.How can i resolve this issue?

Tq. Yes, it worked for me. READ MORE

answered Jun 16, 2020 in Selenium by anonymous
+1 vote
5 answers

Getting this error: “Element is not clickable at point”

There are 3 possible solutions for this: 1. ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
0 votes
1 answer

Error showing up, Unable to click the second page and get title. Any Solution?

Hi, @Faha, As you access the URL there ...READ MORE

answered Nov 25, 2020 in Selenium by Gitika
• 65,930 points