File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
java/client/test/org/openqa/selenium Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public void testShouldAllowUsersToDismissAnAlertManually() {
122
122
wait .until (presenceOfElementLocated (By .id ("alert" ))).click ();
123
123
124
124
Alert alert = wait .until (alertIsPresent ());
125
- alert .dismiss ();
125
+ alert .accept ();
126
126
127
127
// If we can perform any action, we're good to go
128
128
assertEquals ("Testing Alerts" , driver .getTitle ());
@@ -209,7 +209,7 @@ public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
209
209
driver .findElement (By .id ("alert" )).click ();
210
210
211
211
Alert alert = wait .until (alertIsPresent ());
212
- alert .dismiss ();
212
+ alert .accept ();
213
213
214
214
try {
215
215
alert .getText ();
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ public void handleFormWithJavascriptAction() {
287
287
element .submit ();
288
288
Alert alert = driver .switchTo ().alert ();
289
289
String text = alert .getText ();
290
- alert .dismiss ();
290
+ alert .accept ();
291
291
292
292
assertEquals ("Tasty cheese" , text );
293
293
}
You can’t perform that action at this time.
0 commit comments