Skip to content

Commit

Permalink
#1862 #1866 remove usages of deprecated capability "handlesAlerts"
Browse files Browse the repository at this point in the history
Replaced by "unhandledPromptBehavior=accept" (Is it the same?)
  • Loading branch information
asolntsev committed Jun 24, 2022
1 parent 524a8a5 commit d7ace37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -25,9 +25,9 @@
import static org.openqa.selenium.remote.CapabilityType.BROWSER_VERSION;
import static org.openqa.selenium.remote.CapabilityType.PAGE_LOAD_STRATEGY;
import static org.openqa.selenium.remote.CapabilityType.PROXY;
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_ALERTS;
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT;
import static org.openqa.selenium.remote.CapabilityType.TAKES_SCREENSHOT;
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;

@ParametersAreNonnullByDefault
public abstract class AbstractDriverFactory implements DriverFactory {
Expand Down Expand Up @@ -78,7 +78,7 @@ protected <T extends MutableCapabilities> T createCommonCapabilities(T capabilit
}
capabilities.setCapability(SUPPORTS_JAVASCRIPT, true);
capabilities.setCapability(TAKES_SCREENSHOT, true);
capabilities.setCapability(SUPPORTS_ALERTS, true);
capabilities.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, "accept");

transferCapabilitiesFromSystemProperties(capabilities);

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/codeborne/selenide/impl/CleanupTest.java
Expand Up @@ -23,7 +23,7 @@ void cleansWebDriverExceptionMessage() {
"Driver info: org.openqa.selenium.chrome.ChromeDriver\n" +
"Capabilities [{platform=LINUX, chrome.chromedriverVersion=26.0.1383.0, " +
"javascriptEnabled=true, browserName=chrome, rotatable=false, locationContextEnabled=false, " +
"version=24.0.1312.56, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, " +
"version=24.0.1312.56, cssSelectorsEnabled=true, databaseEnabled=false, " +
"browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, " +
"takesScreenshot=true}]";
String expectedException = "NoSuchElementException: The element could not be found";
Expand Down

0 comments on commit d7ace37

Please sign in to comment.