With this current block of code I am getting a timeout exception error and I am not exactly sure why. Can someone help me fix it? The program currently will get to the correct webpage, it just won't do anything after that. I originally added the wait to help the program in finding the xpath for a text entry box when I was thinking the issue was that the webpage wasn't loading quickly enough. Can someone help me fix this issue so that the program can find the xpath correctly and not timeout?
driver = webdriver.Chrome(executable_path="/Users/username/webdrivers/chromedriver")
driver.get("https://www.vinsolutions.com")
loginButton = driver.find_element("xpath", '//*[@id="top-menu"]/li[6]/a')
loginButton.click()
userNameBox = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, '//*[@id="username"]'))
)
userNameBox.send_keys('username')