Guest User

Untitled

a guest
Jun 19th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. driver = webdriver.Chrome(CHROME_DRIVER_PATH)
  2. driver.get("https://za.gl/Kyblj")
  3. try:
  4. WebDriverWait(driver, 20).until(EC.alert_is_present(), 'Timed out waiting for PA creation confirmation popup to appear.')
  5. alert = driver.switch_to.alert
  6. alert.accept()
  7. print("alert accepted")
  8. except TimeoutException:
  9. print("no alert")
Add Comment
Please, Sign In to add comment