Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. global dropdown_counter
  2. global str_counter
  3. global dropdown_link
  4. def open_dropdowns(xpath, dropdown_counter):
  5. for _ in range(23):
  6. str_counter = str(dropdown_counter)
  7. 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
  8. driver.find_element_by_xpath(dropdown_link).click()
  9. dropdown_counter +=1
  10.  
  11. open_dropdowns(']/span/button', 1)
  12. open_dropdowns(']/ol/li[1]/span/button', 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement