I need, click a dropdown menü element. But I'm new Selenium Webdriver and I cant find anything
<div class="sort-fltr-cntnr"><select>
<option value="SCORE">Önerilen</option>
<option value="PRICE_BY_ASC">En Düşük Fiyat</option>
<option value="PRICE_BY_DESC">En Yüksek Fiyat</option>
<option value="MOST_RECENT">En Yeniler</option>
<option value="BEST_SELLER">Çok Satanlar</option> ....
Its my code:
dropdown = self.driver.find_element(By.CSS_SELECTOR, "select")
element=dropdown.find_element(By.XPATH, "//option[. = 'Önerilen']")
self.driver.execute_script("arguments[0].click();", element)
time.sleep()
dropdown.find_element(By.XPATH, "//option[. = 'En Düşük Fiyat']").click()
An given a error:
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //option[. = 'Önerilen']