I am trying to enter a keyword to an auto-select box and select the specific text that I'm passing from the populated list.
Keyword: text_customer
Text needed to select: Constants.INBOUNDORDER_CUSTOMER
So far, the keyword is written in the auto-complete text box and the list is populated. Currently, I'm unable to get the list of elements as I'm struggling to find a unique element. ID is dynamic.
WebElement select = driver.findElement(text_customer);
List<WebElement> options = select.findElements(By.cssSelector("div[class*= 'mat-autocomplete-panel ng-star-inserted mat-autocomplete-visible']"));
for(WebElement option1: options){
if(Constants.INBOUNDORDER_CUSTOMER.equals(option1.getText().trim()))
option1.click();
break;
}