0
How can I select an element from a dropdown through part of its name? I want to select an option based on values taken from a database, but these values do not have the full name of the elements of the dropdown element, there is some way to make Selenium search the element through the partial text?
modelo = googleSheet.modelo.upper().strip()
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div/div/div/div[1]/form/fieldset[6]/div/ul/fieldset[3]/div/ul/fieldset[3]/div/ul/fieldset/div/ul/li/label'))))
select.select_by_visible_text(modelo)
In the dropdown option I want to select "Terrano II 2.7 ol foo", but the value of my database is only Terrano II 2.7
Thanks for the help