Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global dropdown_counter
- global str_counter
- global dropdown_link
- def open_dropdowns(xpath, dropdown_counter):
- for _ in range(23):
- str_counter = str(dropdown_counter)
- dropdown_link = '/html/body/div[1]/div/div[2]/div/div/div[2]/div[1]/nav/div/div/div/div/div[2]/ol/li[' + str_counter + xpath
- driver.find_element_by_xpath(dropdown_link).click()
- dropdown_counter +=1
- open_dropdowns(']/span/button', 1)
- open_dropdowns(']/ol/li[1]/span/button', 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement