@@ -4010,6 +4010,32 @@ def wait_for_and_switch_to_alert(self, timeout=None):
4010
4010
4011
4011
############
4012
4012
4013
+ def accept_alert (self , timeout = None ):
4014
+ """ Same as wait_for_and_accept_alert(), but smaller default T_O """
4015
+ if not timeout :
4016
+ timeout = settings .SMALL_TIMEOUT
4017
+ if self .timeout_multiplier and timeout == settings .SMALL_TIMEOUT :
4018
+ timeout = self .__get_new_timeout (timeout )
4019
+ return page_actions .wait_for_and_accept_alert (self .driver , timeout )
4020
+
4021
+ def dismiss_alert (self , timeout = None ):
4022
+ """ Same as wait_for_and_dismiss_alert(), but smaller default T_O """
4023
+ if not timeout :
4024
+ timeout = settings .SMALL_TIMEOUT
4025
+ if self .timeout_multiplier and timeout == settings .SMALL_TIMEOUT :
4026
+ timeout = self .__get_new_timeout (timeout )
4027
+ return page_actions .wait_for_and_dismiss_alert (self .driver , timeout )
4028
+
4029
+ def switch_to_alert (self , timeout = None ):
4030
+ """ Same as wait_for_and_switch_to_alert(), but smaller default T_O """
4031
+ if not timeout :
4032
+ timeout = settings .SMALL_TIMEOUT
4033
+ if self .timeout_multiplier and timeout == settings .SMALL_TIMEOUT :
4034
+ timeout = self .__get_new_timeout (timeout )
4035
+ return page_actions .wait_for_and_switch_to_alert (self .driver , timeout )
4036
+
4037
+ ############
4038
+
4013
4039
def __assert_eq (self , * args , ** kwargs ):
4014
4040
""" Minified assert_equal() using only the list diff. """
4015
4041
minified_exception = None
0 commit comments