try:
WebDriverWait(self.driver, 5).until(EC.alert_is_present(),
'Timed out waiting for PA creation ' +
'confirmation popup to appear.')
alert = self.driver.switch_to_alert()
alert.accept()
print "alert accepted"
except TimeoutException:
print "no alert"
WebDriverWait(self.driver, 5).until(EC.alert_is_present(),
'Timed out waiting for PA creation ' +
'confirmation popup to appear.')
alert = self.driver.switch_to_alert()
alert.accept()
print "alert accepted"
except TimeoutException:
print "no alert"
No comments:
Post a Comment