File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ def test_alerts(self):
7
7
self .open ("about:blank" )
8
8
self .execute_script ('window.alert("ALERT!!!");' )
9
9
self .sleep (1 ) # Not needed (Lets you see the alert pop up)
10
+ self .assert_true (self .is_alert_present ())
10
11
self .accept_alert ()
11
12
self .sleep (1 ) # Not needed (Lets you see the alert go away)
12
13
self .execute_script ('window.prompt("My Prompt","defaultText");' )
@@ -15,6 +16,7 @@ def test_alerts(self):
15
16
self .assert_equal (alert .text , "My Prompt" ) # Not input field
16
17
self .dismiss_alert ()
17
18
self .sleep (1 ) # Not needed (Lets you see the alert go away)
19
+ self .assert_false (self .is_alert_present ())
18
20
if self .browser == "safari" and self ._reuse_session :
19
21
# Alerts can freeze Safari if reusing the browser session
20
22
self .driver .quit ()
You can’t perform that action at this time.
0 commit comments