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):
77 self .open ("about:blank" )
88 self .execute_script ('window.alert("ALERT!!!");' )
99 self .sleep (1 ) # Not needed (Lets you see the alert pop up)
10+ self .assert_true (self .is_alert_present ())
1011 self .accept_alert ()
1112 self .sleep (1 ) # Not needed (Lets you see the alert go away)
1213 self .execute_script ('window.prompt("My Prompt","defaultText");' )
@@ -15,6 +16,7 @@ def test_alerts(self):
1516 self .assert_equal (alert .text , "My Prompt" ) # Not input field
1617 self .dismiss_alert ()
1718 self .sleep (1 ) # Not needed (Lets you see the alert go away)
19+ self .assert_false (self .is_alert_present ())
1820 if self .browser == "safari" and self ._reuse_session :
1921 # Alerts can freeze Safari if reusing the browser session
2022 self .driver .quit ()
You can’t perform that action at this time.
0 commit comments