Im new to python, or coding for that matter... Currently I have a python script to select one option within the dropdown menu, but I would like my script to repeat each time and select the next option. Theres about 50 different options within the dropdown.
l1 = "Hong Kong, China (Chrome, Canary, Firefox)"
urlTextBox = "url"
dropdownOption = "location"
submitBtn = ".//*[@id='start_test-container']/p/input"
homeBtn = ".//*[@id='nav']/li[1]/a"
urlTextBoxElement = WebDriverWait(driver, 10).\
until(lambda driver: driver.find_element_by_id(urlTextBox))
dropdownOptionElement = WebDriverWait(driver, 10).\
until(lambda driver: driver.find_element_by_id(dropdownOption))
submitBtnElement = WebDriverWait(driver, 10).\
until(lambda driver: driver.find_element_by_xpath(submitBtn))
urlTextBoxElement.send_keys(webTeamPage)
Select(dropdownOptionElement).select_by_visible_text(l1)
submitBtnElement.click()
time.sleep(3)
homeBtnElement = WebDriverWait(driver, 10).\
until(lambda driver: driver.find_element_by_xpath(homeBtn))