I am trying to inspect dropdown in selenium using java which is displayed on the frontend but it is having 'aria-hidden='true' in its source code.. but it is giving me error as 'Element not interactable'. Have tried using below options:
- 'WebElement dropdown = wait.until(ExpectedConditions.presenceOfElementLocated'
- Select class
- Xpath, id & classname
Code snip:
WebDriverWait wait = new WebDriverWait(driver, 10); //First click on dropdown to show options
WebElement dropdown = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("select[id='lender_id']")));
dropdown.click(); //Now find desired option and click
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("select[id='lender_id']"))).click();