Fixing chromedriver backward compatibility
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.openqa.selenium.remote.CapabilityType.PAGE_LOAD_STRATEGY;
+import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR;
import static org.openqa.selenium.remote.CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR;
import com.google.common.base.Objects;
@@ -205,6 +206,7 @@ public void setPageLoadStrategy(PageLoadStrategy strategy) {
public void setUnhandledPromptBehaviour(UnexpectedAlertBehaviour behaviour) {
capabilities.setCapability(UNHANDLED_PROMPT_BEHAVIOUR, behaviour);
+ capabilities.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, behaviour);
}
/**
