How can I check the checkbox inside a dropdown menu with Python Selenium?
Within a list I have many checkboxes. I would like to activate the checkboxes that I pass through the code, but I have not been able to achieve it.
This is the structure of the web page, I can't see the selector Id for the checkbox, only I can see it the data-value or the text value name Texto1, Texto2, Texto3, etc.
So my question is how can I check the checkbox with the data-value or text name?
I'm using this code:
from selenium import webdriver
from selenium.webdriver.support.select import Select
driver = webdriver.Chrome('C:/Driver/chromedriver.exe')
driver.implicitly_wait(30)
driver.set_page_load_timeout(50)
driver.get('http://midominio.com/')
driver.implicitly_wait(40)
driver.find_element_by_id("dropdownMenu2").click()