Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97799

Selecting a dynamic drop down item in Selenium

$
0
0

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:

Here

The drop down after it's been clicked looks like this:

Here

The HTML code:

Here

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

Viewing all articles
Browse latest Browse all 97799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>