06
Oct

When to expect ElementNotInteractableException in Selenium

ElementNotInteractableException : 
ElementNotInteractableException is throws when we try to perform operation on an element which not intereactable at the moment. ElementNotInteractableException has two subclasses which are ElementNotVisibleException, ElementClickInterceptedException.
Reasons : 
1. When element size is 0 x 0 (width =0 and height =0)

Code which causes the ElementNotInteractableException :
<input type='button' height=0px width=0px value='save'>

// click the button which has width=0 and height=0
driver.findElement(By.xpath("//input[@type='button']")).click();