From 2cdda1fa2b959ca084a4ecb10114b86f571b2986 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Thu, 12 May 2022 22:39:26 +0200 Subject: [PATCH] [java] Deprecating IME [skip ci] --- .../ImeActivationFailedException.java | 2 ++ .../selenium/ImeNotAvailableException.java | 3 +++ java/src/org/openqa/selenium/WebDriver.java | 2 ++ .../selenium/remote/RemoteWebDriver.java | 19 ++++++++++++------- .../support/events/EventFiringWebDriver.java | 3 +++ 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/java/src/org/openqa/selenium/ImeActivationFailedException.java b/java/src/org/openqa/selenium/ImeActivationFailedException.java index 19f2dd1c4e475..9eca7fd772e85 100644 --- a/java/src/org/openqa/selenium/ImeActivationFailedException.java +++ b/java/src/org/openqa/selenium/ImeActivationFailedException.java @@ -19,6 +19,8 @@ /** * Indicates that activating an IME engine has failed. + * + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. */ public class ImeActivationFailedException extends WebDriverException { public ImeActivationFailedException(String message) { diff --git a/java/src/org/openqa/selenium/ImeNotAvailableException.java b/java/src/org/openqa/selenium/ImeNotAvailableException.java index b1076c4127e32..9029b1ef8e7b8 100644 --- a/java/src/org/openqa/selenium/ImeNotAvailableException.java +++ b/java/src/org/openqa/selenium/ImeNotAvailableException.java @@ -20,7 +20,10 @@ /** * Indicates that IME support is not available. This exception is thrown for every IME-related * method call if IME support is not available on the machine. + * + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. */ + public class ImeNotAvailableException extends WebDriverException { public ImeNotAvailableException(String message) { super(message); diff --git a/java/src/org/openqa/selenium/WebDriver.java b/java/src/org/openqa/selenium/WebDriver.java index 05a9340c93c63..c5b9024bb63ea 100644 --- a/java/src/org/openqa/selenium/WebDriver.java +++ b/java/src/org/openqa/selenium/WebDriver.java @@ -277,6 +277,7 @@ interface Options { /** * @return the interface for controlling IME engines to generate complex-script input. + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. */ ImeHandler ime(); @@ -633,6 +634,7 @@ interface Navigation { } /** + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. * An interface for managing input methods. */ interface ImeHandler { diff --git a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java index 0597ee468d445..a50845539b358 100644 --- a/java/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -17,13 +17,6 @@ package org.openqa.selenium.remote; -import static java.util.Collections.singleton; -import static java.util.concurrent.TimeUnit.SECONDS; -import static org.openqa.selenium.remote.CapabilityType.LOGGING_PREFS; -import static org.openqa.selenium.remote.CapabilityType.PLATFORM; -import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; -import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT; - import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -97,7 +90,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static java.util.Collections.singleton; +import static java.util.concurrent.TimeUnit.SECONDS; import static java.util.logging.Level.SEVERE; +import static org.openqa.selenium.remote.CapabilityType.LOGGING_PREFS; +import static org.openqa.selenium.remote.CapabilityType.PLATFORM; +import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; +import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT; @Augmentable public class RemoteWebDriver implements WebDriver, @@ -837,6 +836,9 @@ public Timeouts timeouts() { return new RemoteTimeouts(); } + /** + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. + */ @Override public ImeHandler ime() { return new RemoteInputMethodManager(); @@ -848,6 +850,9 @@ public Window window() { return new RemoteWindow(); } + /** + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. + */ protected class RemoteInputMethodManager implements WebDriver.ImeHandler { @Override diff --git a/java/src/org/openqa/selenium/support/events/EventFiringWebDriver.java b/java/src/org/openqa/selenium/support/events/EventFiringWebDriver.java index 3e37703628894..20a7261e8eba8 100644 --- a/java/src/org/openqa/selenium/support/events/EventFiringWebDriver.java +++ b/java/src/org/openqa/selenium/support/events/EventFiringWebDriver.java @@ -660,6 +660,9 @@ public Timeouts timeouts() { return new EventFiringTimeouts(options.timeouts()); } + /** + * @deprecated Will be removed. IME is not part of W3C WebDriver and does not work on browsers. + */ @Override public ImeHandler ime() { return options.ime();