I have a dynamic drop down menu and I want to select one of the items within it. I have tried using the Select method but I believe that it doesn't work because the drop down isn't a select item. So instead, I think the solution would be to first click the drop down and then search for the item I want to select.
The drop down looks like this:
The drop down after it's been clicked looks like this:
The HTML code:
I have tried getting my Python script to click the drop down so that it expands but I believe I must be using the wrong ID (s2_id_autogen10_search
). Any help or any other solution ideas would be appreciated.
EDIT:
So I am now trying to get Selenium to click the listbox to expand the options. Given the HTML code below, I am trying:
driver.find_element_by_id("select2-results-10").click()
However, it is not working. I receive this error.
selenium.common.exceptions.ElementNotInteractableException: Message: element
not interactable