Selenium search by tag name option
Selenium search by tag name option I'm trying to get all data from a website called Correios, in this website, I need to handle some dropdowns wich i'm having some issues like: It's returning a list with a bunch of empty strings. That's my code: chrome_path = r"C:\Users\Gustavo\Desktop\geckodriver\chromedriver.exe" driver = webdriver.Chrome(chrome_path) lista_x = driver.get("http://www2.correios.com.br/sistemas/agencias/") driver.maximize_window() dropdownEstados = driver.find_elements_by_xpath("""//*[@id="estadoAgencia"]""") optEstados = driver.find_elements_by_tag_name("option") for valores in optEstados: print(valores.text.encode()) And what i get from that is: b'' b'ACRE' b'ALAGOAS' b'AMAPxc3x81' b'AMAZONAS' b'BAHIA' b'CEARxc3x81' b'DISTRITO FEDERAL' b'ESPxc3x8dRITO SANTO' b'GOIxc3x81S' b'MARANHxc3x83O' b...