Skip to content

Commit

Permalink
[java] Remove deprecated "unexpectedAlertBehaviour" JWP capability
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Apr 26, 2023
1 parent 41bbc5f commit 940b183
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
6 changes: 0 additions & 6 deletions java/src/org/openqa/selenium/SharedCapabilitiesMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ static void setCapability(Map<String, Object> caps, String key, Object value) {
return;
}

if ("unexpectedAlertBehaviour".equals(key)) {
caps.put("unexpectedAlertBehaviour", value);
caps.put("unhandledPromptBehavior", value);
return;
}

caps.put(key, value);
}

Expand Down
3 changes: 2 additions & 1 deletion java/src/org/openqa/selenium/ie/InternetExplorerDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ public class InternetExplorerDriver extends RemoteWebDriver {

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

/**
* Capability that defines to use or not cleanup of element cache on document loading.
Expand Down
5 changes: 0 additions & 5 deletions java/src/org/openqa/selenium/remote/CapabilityType.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public interface CapabilityType {
*/
@Deprecated
String SUPPORTS_WEB_STORAGE = "webStorageEnabled";
/**
* @deprecated Use {@link CapabilityType#UNHANDLED_PROMPT_BEHAVIOUR}
*/
@Deprecated
String UNEXPECTED_ALERT_BEHAVIOUR = "unexpectedAlertBehaviour";

String BROWSER_NAME = "browserName";
String PLATFORM_NAME = "platformName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import java.util.logging.Logger;

import static org.openqa.selenium.UnexpectedAlertBehaviour.IGNORE;
import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;

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

MutableCapabilities caps = new MutableCapabilities(createCapabilities());
caps.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, IGNORE);
caps.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, IGNORE);

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

Expand Down

0 comments on commit 940b183

Please sign in to comment.