Error when getting options of Select element in Python Selenium
It looks like there is an another element with the same name which is not select
and get matched by the "by name" locator. Improve the way you locating the element explicitly asking for select
element with the desired name:
elem = driver.find_element_by_css_selector('select[name=sl_coursePage]')
Or, checking the id
:
elem = driver.find_element_by_css_selector('select#sl_coursePage')
You are trying to fetch the element by name
elem = driver.get_element_by_name('sl_coursePage')
Try to fetch it from id or a css selector instead, something like
elem =driver.findElement(By.id('sl_coursePage'))