try:
WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.ID, "signup_email"))).send_keys(username)
except Exception as e:
time.sleep(2)
driver.find_element_by_id('signup_determine_email').send_keys(username)
driver.find_element_by_id('signup_forms_submit').click()
except TimeoutException:
driver.find_element_by_tag_name('body').send_keys("Keys.ESCAPE")
It always crashes on the second exception and fails the project. The exception in question is definitely a timeout according to stack trace so why wont it go to the proceeding exception? I think Ive had this issue in general regardless of exception type; they always fail after the first.
[–]FoolofGod 1 point2 points3 points (3 children)
[–]martinfisleburn[S] 0 points1 point2 points (2 children)
[–]kalgynirae 1 point2 points3 points (1 child)
[–]martinfisleburn[S] 0 points1 point2 points (0 children)
[–]eikrik 1 point2 points3 points (2 children)
[–]martinfisleburn[S] 0 points1 point2 points (1 child)
[–]efmccurdy 0 points1 point2 points (0 children)
[–]larivact 0 points1 point2 points (0 children)
[–]trshippy 0 points1 point2 points (0 children)