-1

I tried to enter some text in a text box using sendKeys after clicking on the element

The text box had xpath //td[@id='xyz']/span

Received the error - Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable

Need suggestion on entering the value in the textbox

  • Possible duplicate of https://stackoverflow.com/questions/49864965/org-openqa-selenium-elementnotinteractableexception-element-is-not-reachable-by – Eng.Fouad Mar 11 '20 at 20:13
  • 2
    Need your code and html code, otherwise we can't help u. – IPolnik Mar 11 '20 at 20:27
  • You likely have the wrong locator. You are finding an element that you cannot sendkeys to because it's not interactable. It's also possible that you need to add a wait for visible to ensure that the page/element is loaded before trying to interact with it. Where's your code? Please post a [mcve] and describe what else you may have tried. – JeffC Mar 11 '20 at 22:17

1 Answers1

0

May try to enter before it appears,

You can try to increase the wait.

WebDriverWait wdw = new WebDriverWait(driver, 5);
wdw.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("// td [@ id ='xyz'] / span"))).sendKeys("1234");

Or add before

driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
Ruyut
  • 133
  • 9