Select - Dropdown menu option not selected - Python Selenium

Asked

Viewed 51 times

0

Hello,

I’m doing a Python project using Selenium. When you select to choose an option from a dropdown menu, it is not selected. I’ve always done it this way and it’s always worked and I wonder if anyone can help me. Just follow my code.

# Marca
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[2]/div[2]/div/select'))))
select.select_by_visible_text(googleSheet.marca)
time.sleep(r)

# Modelo
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[3]/div[1]/div/span/select'))))
select.select_by_visible_text(googleSheet.modelo)
time.sleep(r)

# Versão
select = Select(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '/html/body/form/div[3]/div[2]/div[1]/div[4]/div/div[2]/div[1]/div[3]/div[2]/div/div/select'))))
select.select_by_visible_text(googleSheet.versao)

Am I forgetting something? I appreciate the help

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.