I am trying to fill out a form for states where I would select one at the bottom Oregon. From https://www.adidas.com/us/delivery-start. New to coding thank you!
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
state = driver.find_element_by_xpath('//*[@id="dwfrm_delivery"]/div[2]/div[2]/div/fieldset/div/div[1]/div[6]/div[1]/div/div/a/span')
stateselect = state.select_by_visible_test("Oregon")
This is the error I am getting
AttributeError: 'WebElement' object has no attribute 'select_by_visible_test'.
And with
state = driver.find_element_by_xpath('//*[@id="dwfrm_delivery"]/div[2]/div[2]/div/fieldset/div/div[1]/div[6]/div[1]/div/div/a/span')
stateselect = state.send_keys("Oregon")
I get the following :
error:WebDriverException: Message: unknown error: cannot focus element
Please help me understand the error for both cases to further my understanding. And point me in the right direction.