I am trying to webscrape price list from a website and to do that I need to bypass age verification. To do that I am using following code to select the year "1999" but I am getting this error ----
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="year_field"]"}
The code that I use:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.support.ui import Select
PATH="chromedriver.exe"
driver=webdriver.Chrome(PATH)
driver.get("https://valuebuds.com/pages/search-results-page")
driver.switch_to.frame("_hjRemoteVarsFrame")
time.sleep(5)
sel=Select(driver.find_element_by_name ("year_field"))
sel.Select_by_visible_text("1999")
print(driver.title)
Any help on this will be appreciated! Thanks