I have been trying for a long time to get Selenium to select an option from a drop down select field. It appears not to be selecting the element whatsoever. Could the fact that it requires a reload link be causing issues?

from selenium import webdriver
from selenium.webdriver.support.ui import Select
from bs4 import BeautifulSoup
import csv
import requests
import re

driver2 = webdriver.Chrome()

el = driver2.find_element_by_id('league-filter-list')
for option in el.find_elements_by_tag_name('option'):
    if option.text == 'Football League Championship':

  • 1
    Can you post the Source for the dropdown element itself? It'll help a lot of finding some other alternatives to select the dropdown.
    – Mercfh
    May 3, 2016 at 17:24
  • 2
    paste your HTML code here so that we can help you. May 4, 2016 at 7:46

3 Answers 3


try this:

el = driver2.find_element_by_id('league-filter-list')
el.select_by_visible_text('Football League Championship')
  • We prefer answers to have context and not be simply code without explanation.
    – Kate Paulk
    Oct 31, 2016 at 15:01
  • Jose could you elaborate on the difference between this answer and the OP? I think you're correct, but it's taking some heat for being code-only. It's one of those "give a fish, teach to fish" kind of things.
    – corsiKa
    Nov 2, 2016 at 14:59

You're trying to click an invisible element, which won't work.

It's easiest to use the select class.

For an example, see Daniel Abel's answer in this thread: What is the correct way to select an <option> using Selenium's Python WebDriver


As a workaround for dropdown menus that dont have data before interaction you could simply click text after clicking on element.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.