I am having trouble selecting from a drop down list (two actually, Season and Date). I can obtain the values which I want to input to the drop down selector, however am unable to understand what I need to do to be able to programmatically select from the dropdown.
This is the website which is of interest: https://dataride.uci.ch/iframe/RankingDetails/1?disciplineId=10&groupId=1&momentId=19264&disciplineSeasonId=19&rankingTypeId=1&categoryId=22&raceTypeId=0
Here is the base code that I am using: (very sorry about the formatting, had trouble with long strings.)
`import requests
from selenium import webdriver
from time import sleep
from bs4 import BeautifulSoup
url='https://dataride.uci.ch/iframe/RankingDetails/1?disciplineId=10&groupId=1&momentId=19264&disciplineSeasonId=19&rankingTypeId=1&categoryId=22&raceTypeId=0' browser=webdriver.Chrome(executable_path='F:\Anaconda\chromedriver\chromedriver_win32\chromedriver.exe')
browser.get(url) season_list=browser.find_element_by_id('seasons_listbox').get_attribute('textContent')dates_list=browser.find_element_by_id('dates_listbox').get_attribute('textContent').split('Ranking')[1]
for i in range(0,len(season_list),4):
year=season_list[i:i+4]
for j in range(0,len(dates_list),10):
date=dates_list[j:j+10]
print('YEAR: ',season_list[i:i+4],' DATE ',dates_list[j:j+10])`
Here is a screenshot of the two menus I would like to be able to iterate through:
