'How to select a value from the dropdown using selenium, the values change as per selection and there are around 100 values in the dropdown

screenshot

<input aria-invalid="false" autocomplete="off" id="procedureFields" required="" type="text" class="MuiInputBase-input MuiOutlinedInput-input MuiAutocomplete-input MuiAutocomplete-inputFocused MuiInputBase-inputAdornedEnd MuiOutlinedInput-inputAdornedEnd" aria-autocomplete="list" autocapitalize="none" spellcheck="false" value="">

Query - How to select a value from the dropdown using selenium, the values change as per selection and there are around 100 values in the dropdown.

I have tried using select and action class

    WebElement procCodes = driver.findElement(By.xpath("//input[@id = 'procedureFields']"));
    procCodes.click();
    Actions myAction = new Actions(driver); 
    myAction.sendKeys(Keys.chord(Keys.DOWN, Keys.DOWN, Keys.ENTER)).build().perform();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source