Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. try:
  2.     test = driver.find_element_by_link_text("mprescott").text
  3. except: #it is better if you know what exception to expect and except only that
  4.     test=None
  5. if test:
  6.     driver.find_element_by_link_text("mprescott").click()
  7. else:
  8.     driver.find_element_by_css_selector("i.icon-angle-right").click()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement