org.openqa.selenium.ElementNotInteractableException: element not interactable
존재하는 요소이지만 클릭이 안되는 경우 나타나는 에러이다.
webElement = driver.findElement(By.cssSelector("#searchBtn > img"));
// 기존코드
//webElement.click();
// 방법 1.
//webElement.sendKeys(Keys.ENTER);
// 방법 2. -> 해결
JavascriptExecutor jsx = (JavascriptExecutor) driver;
jsx.executeScript("arguments[0].click;", webElement);
가장 흔하게 보이는 해결 방법은
click()을 sendKeys(Keys.ENTER)으로 바꾸는 것이었는데
이번 경우에는 sendKeys로도 해결되지 않아서
서치해본 결과 js로도 할 수 있다는 것을 알게 되었다.