There is an element that is not a text box or a button, there are just a list of items. And me sending enter on the webpage would clear my list of orders from the UI.
I was trying to use driver.findElement(By.xpath("xpath_name").sendKeys(Keys.ENTER); I tried to .click() the same element and it works.. But when I try to sendKeys(Enter), it says element is not interactable.
All the examples of internet only explained about sending Enter key after typing something or inside a textField.
I tried js.executeScript as well.. still element is not interactable is the issue I get.
Please use that sendkeys on different element, your current accessing element is not visible on the page. so try it on visible element in your page.