From acb3fbdec323328f7a340e4f1599051235cb2197 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Mon, 15 May 2023 17:59:18 +0200 Subject: [PATCH] replace CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR with CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR --- .../java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java index 1279ad77..27198c6f 100644 --- a/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java +++ b/src/main/java/org/openqa/selenium/htmlunit/HtmlUnitAlert.java @@ -17,8 +17,6 @@ package org.openqa.selenium.htmlunit; -import static org.openqa.selenium.remote.CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR; - import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; @@ -33,6 +31,7 @@ import org.openqa.selenium.NoAlertPresentException; import org.openqa.selenium.UnexpectedAlertBehaviour; import org.openqa.selenium.UnhandledAlertException; +import org.openqa.selenium.remote.CapabilityType; /** * Implementation of {@link Alert}. @@ -129,7 +128,7 @@ public void setAutoAccept(final boolean autoAccept) { public void handleBrowserCapabilities(final Capabilities capabilities) { final UnexpectedAlertBehaviour behaviour = (UnexpectedAlertBehaviour) capabilities - .getCapability(UNEXPECTED_ALERT_BEHAVIOUR); + .getCapability(CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR); if (behaviour != null) { this.unexpectedAlertBehaviour_ = behaviour; }