Skip to content

Commit

Permalink
[java] Deprecating IME
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
diemol committed May 12, 2022
1 parent 8bcf64c commit 2cdda1f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions java/src/org/openqa/selenium/ImeNotAvailableException.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/WebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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 {
Expand Down
19 changes: 12 additions & 7 deletions java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2cdda1f

Please sign in to comment.