Skip to content

Commit 940b183

Browse files
committed
[java] Remove deprecated "unexpectedAlertBehaviour" JWP capability
1 parent 41bbc5f commit 940b183

4 files changed

Lines changed: 4 additions & 14 deletions

File tree

java/src/org/openqa/selenium/SharedCapabilitiesMethods.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ static void setCapability(Map<String, Object> caps, String key, Object value) {
6464
return;
6565
}
6666

67-
if ("unexpectedAlertBehaviour".equals(key)) {
68-
caps.put("unexpectedAlertBehaviour", value);
69-
caps.put("unhandledPromptBehavior", value);
70-
return;
71-
}
72-
7367
caps.put(key, value);
7468
}
7569

java/src/org/openqa/selenium/ie/InternetExplorerDriver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ public class InternetExplorerDriver extends RemoteWebDriver {
5858

5959
/**
6060
* Capability that defines which behaviour will be used if an unexpected Alert is found.
61+
* @deprecated Use {@link CapabilityType#UNHANDLED_PROMPT_BEHAVIOUR}
6162
*/
62-
public static final String UNEXPECTED_ALERT_BEHAVIOR = CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
63+
public static final String UNEXPECTED_ALERT_BEHAVIOR = "unexpectedAlertBehaviour";
6364

6465
/**
6566
* Capability that defines to use or not cleanup of element cache on document loading.

java/src/org/openqa/selenium/remote/CapabilityType.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ public interface CapabilityType {
3232
*/
3333
@Deprecated
3434
String SUPPORTS_WEB_STORAGE = "webStorageEnabled";
35-
/**
36-
* @deprecated Use {@link CapabilityType#UNHANDLED_PROMPT_BEHAVIOUR}
37-
*/
38-
@Deprecated
39-
String UNEXPECTED_ALERT_BEHAVIOUR = "unexpectedAlertBehaviour";
4035

4136
String BROWSER_NAME = "browserName";
4237
String PLATFORM_NAME = "platformName";

java/test/com/thoughtworks/selenium/InternalSelenseTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import java.util.logging.Logger;
5656

5757
import static org.openqa.selenium.UnexpectedAlertBehaviour.IGNORE;
58-
import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
58+
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;
5959

6060
public class InternalSelenseTestBase extends SeleneseTestBase {
6161
private static final Logger log = Logger.getLogger(InternalSelenseTestBase.class.getName());
@@ -98,7 +98,7 @@ public void setup(TestInfo testInfo) {
9898
}
9999

100100
MutableCapabilities caps = new MutableCapabilities(createCapabilities());
101-
caps.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, IGNORE);
101+
caps.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, IGNORE);
102102

103103
String baseUrl = whereIs("/common/rc/tests/html/");
104104

0 commit comments

Comments
 (0)