0
I have the following code:
select = Select(driver.find_element_by_id('Identificador')).select_by_visible_text('Maio/2019')
form = driver.find_element_by_name('Formulario')
driver.find_element_by_xpath("//form[@name='Formulario']/input[@type='submit'][@value='Ok']").click()
I’d like to automate that with a for
for several months and years.
month = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro",
"Novembro", "Dezembro"]
year_today = datetime.date.today().year
year = range(2007,year_today,1)
for i in year:
for j in month:
print('Downloading',j,i)
select = Select(driver.find_element_by_id('Identificador')).select_by_visible_text('Maio/2019')
form = driver.find_element_by_name('Formulario')
driver.find_element_by_xpath("//form[@name='Formulario']/input[@type='submit'][@value='Ok']").click()
How I replace "May/2019" with values of Month and year?
Ah, I understand how it works! Thank you! I just needed to change the
year
fori
. Thanks!– RxT
I’m glad you made it!
– Ricardo Tenorio