selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[🐛 Bug]: HTTP method not allowed for IME

Open alaahong opened this issue 3 years ago • 10 comments

What happened?

Does Selenium still support to work on IME?

Both request failed on Firefox and Chrome in local Windows browser.

Get the background from a stackoverflow answer: https://stackoverflow.com/questions/26588441/what-exactly-does-ime-in-selenium-do So try to call the docker firefox based on Linux by below command: docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-firefox:4.1.3-20220405 Still failed image image

Try to check the Selenium unit test https://github.com/SeleniumHQ/selenium/blob/8ef70018710104a03311b7627290301e08228947/java/test/org/openqa/selenium/I18nTest.java#L128

Seems ignore all browsers? @Ignore(IE) @Ignore(CHROME) @Ignore(EDGE) @Ignore(FIREFOX) @NotYetImplemented(HTMLUNIT)

So what's the specific usage on ImeHandler and any available scenario?

Can't find out the related section in WebDriver part, seems it's another story as below? https://www.w3.org/TR/ime-api/

Thanks.

How can we reproduce the issue?

@Test
  public void testUnsupportedCommandException() {
    Assertions.assertThatExceptionOfType(UnsupportedCommandException.class)
            .isThrownBy(() -> driver.manage().ime().getActiveEngine());
    Assertions.assertThatExceptionOfType(UnsupportedCommandException.class)
            .isThrownBy(() -> driver.manage().ime().isActivated());
    Assertions.assertThatExceptionOfType(UnsupportedCommandException.class)
            .isThrownBy(() -> driver.manage().ime().getAvailableEngines());
  }

Relevant log output

14:55:12.569 INFO [LocalDistributor.newSession] - Session request received by the distributor:
 [Capabilities {acceptInsecureCerts: true, browserName: firefox, moz:debuggerAddress: true, moz:firefoxOptions: {args: [], log: {level: trace}, prefs: {toolkit.asyncshutdown.log: true}}}]
1650812112573   geckodriver     INFO    Listening on 127.0.0.1:53237
1650812112593   mozrunner::runner       INFO    Running command: "/usr/bin/firefox" "--marionette" "--remote-debugging-port" "35320" "-no-remote" "-profile" "/tmp/rust_mozprofilen3PXsv"
1650812112593   geckodriver::marionette DEBUG   Waiting 60s to connect to browser on 127.0.0.1:37095
1650812112593   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
1650812112694   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker AddonManager: shutting down. for phase profile-before-change
DEBUG: Adding blocker IOUtils Blocker (profile-before-change) for phase profile-before-change
DEBUG: Adding blocker IOUtils Blocker (xpcom-will-shutdown) for phase xpcom-will-shutdown
DEBUG: Adding blocker Flush WebExtension StartupCache for phase IOUtils: waiting for profileBeforeChange IO to complete
1650812112794   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker JSON store: writing data for phase AddonManager: Waiting for providers to shut down.
DEBUG: Adding blocker Update add-on blocklist state into add-on DB for phase AddonManager: Waiting to start provider shutdown.
DEBUG: Adding blocker XPIProvider shutdown for phase quit-application-granted
DEBUG: Adding blocker XPIProvider for phase AddonManager: Waiting for providers to shut down.
DEBUG: Adding blocker ServiceWorkerRegistrar: Flushing data for phase profile-before-change
DEBUG: Adding blocker CrashMonitor: Writing notifications to file after receiving profile-before-change and awaiting all checkpoints written for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker TelemetryController: shutting down for phase profile-before-change-telemetry
1650812112894   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
1650812112994   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
[GFX1-]: glxtest: libpci missing
[GFX1-]: glxtest: libEGL missing
1650812113094   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker EnvironmentAddonBuilder for phase AddonManager: Waiting to start provider shutdown.
DEBUG: Adding blocker RemoteSettingsClient - finish IDB access. for phase profile-before-change
1650812113121   RemoteAgent     DEBUG   CDP enabled
1650812113121   Marionette      INFO    Marionette enabled
DEBUG: Adding blocker PermissionManager: Flushing data for phase xpcom-will-shutdown
1650812113170   Marionette      TRACE   Received observer notification toplevel-window-ready
DEBUG: Completed blocker Update add-on blocklist state into add-on DB for phase AddonManager: Waiting to start provider shutdown.
DEBUG: Adding blocker ClientManagerService: start destroying IPC actors early for phase xpcom-will-shutdown
DEBUG: Adding blocker Flush AddonRepository for phase profile-before-change
1650812113195   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker OS.File: flush pending requests, warn about unclosed files, shut down service. for phase xpcom-will-shutdown
DEBUG: Adding blocker OS.File: flush I/O queued before profileBeforeChange for phase profile-before-change
1650812113295   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker MediaShutdownManager: shutdown for phase profile-before-change
1650812113395   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker Remote Settings profile-before-change for phase profile-before-change
DEBUG: Adding blocker GMPProvider for phase AddonManager: Waiting for providers to shut down.
DEBUG: Adding blocker ContentParent: id=7ff1e36f7c00 for phase xpcom-will-shutdown
DEBUG: Adding blocker ContentParent: id=7ff1e36f7c00 for phase profile-before-change
1650812113495   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker ServiceWorkerShutdownBlocker: shutting down Service Workers for phase profile-change-teardown
DEBUG: Adding blocker ContentParent: id=7ff1f46f5b00 for phase xpcom-will-shutdown
DEBUG: Adding blocker ContentParent: id=7ff1f46f5b00 for phase profile-before-change
1650812113596   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker PageActions: purging unregistered actions from cache for phase profile-before-change
DEBUG: Adding blocker Places Clients shutdown for phase profile-change-teardown
DEBUG: Adding blocker Places Connection shutdown for phase profile-before-change
1650812113696   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker sanitize.js: Sanitize on shutdown for phase Places Clients shutdown
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofilen3PXsv/search.json.mozlz4", (void 0)))
DEBUG: Adding blocker Sqlite.jsm shutdown blocker for phase profile-before-change
DEBUG: Adding blocker content-prefs.sqlite#0: waiting for shutdown for phase Sqlite.jsm: wait until all connections are closed
DEBUG: Adding blocker Closing ContentPrefService2 connection. for phase Sqlite.jsm: wait until all clients have completed their task
DEBUG: Adding blocker Transaction (0) for phase content-prefs.sqlite#0: waiting for clients
1650812113796   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Completed blocker Transaction (0) for phase content-prefs.sqlite#0: waiting for clients
DEBUG: Adding blocker ContextualIdentityService: writing data for phase profile-before-change
DEBUG: Adding blocker Transaction (1) for phase content-prefs.sqlite#0: waiting for clients
DEBUG: Adding blocker Transaction (2) for phase content-prefs.sqlite#0: waiting for clients
DEBUG: Completed blocker Transaction (1) for phase content-prefs.sqlite#0: waiting for clients
DEBUG: Completed blocker Transaction (2) for phase content-prefs.sqlite#0: waiting for clients
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
1650812113896   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
1650812113996   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
1650812114097   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker Search service: shutting down for phase IOUtils: waiting for profileBeforeChange IO to complete
1650812114197   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Adding blocker places.sqlite#1: waiting for shutdown for phase Sqlite.jsm: wait until all connections are closed
DEBUG: Adding blocker Places Expiration: shutdown for phase Places Connection shutdown
DEBUG: Adding blocker PlacesUtils wrapped connection closing as part of Places shutdown for phase Places Connection shutdown
DEBUG: Adding blocker PlacesUtils wrapped connection must be closed before Sqlite.jsm for phase Sqlite.jsm: wait until all clients have completed their task
DEBUG: Adding blocker places.sqlite#1: PlacesExpiration.jsm: setup (0) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#0: waiting for shutdown for phase Sqlite.jsm: wait until all connections are closed
DEBUG: Adding blocker PlacesUtils read-only connection closing as part of Places shutdown for phase Places Connection shutdown
DEBUG: Adding blocker PlacesUtils read-only connection must be closed before Sqlite.jsm for phase Sqlite.jsm: wait until all clients have completed their task
DEBUG: Completed blocker places.sqlite#1: PlacesExpiration.jsm: setup (0) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker Transaction (1) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: Bookmarks.jsm: eraseEverything (2) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: PlacesUIUtils: maybeAddImportButton (3) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: PlacesUIUtils: maybeAddImportButton (3) for phase places.sqlite#1: waiting for clients
1650812114297   geckodriver::marionette TRACE   Connection refused (os error 111). Retrying in 100ms
DEBUG: Completed blocker Transaction (1) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: Bookmarks.jsm: eraseEverything (2) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: Bookmarks.jsm: fetchBookmark (4) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: Bookmarks.jsm: fetchBookmark (4) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker Transaction (5) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: Bookmarks.jsm: insertBookmarkTree (6) for phase places.sqlite#1: waiting for clients
1650812114341   RemoteAgent     TRACE   Received observer notification remote-startup-requested
1650812114351   RemoteAgent     DEBUG   Setting recommended pref apz.content_response_timeout to 60000
1650812114351   RemoteAgent     DEBUG   Setting recommended pref browser.contentblocking.introCount to 99
1650812114351   RemoteAgent     DEBUG   Setting recommended pref browser.download.panel.shown to true
1650812114351   RemoteAgent     DEBUG   Setting recommended pref browser.newtabpage.enabled to false
1650812114352   RemoteAgent     DEBUG   Setting recommended pref browser.pagethumbnails.capturing_disabled to true
1650812114352   RemoteAgent     DEBUG   Setting recommended pref browser.search.update to false
1650812114353   RemoteAgent     DEBUG   Setting recommended pref browser.tabs.disableBackgroundZombification to false
1650812114353   RemoteAgent     DEBUG   Setting recommended pref browser.tabs.unloadOnLowMemory to false
1650812114354   RemoteAgent     DEBUG   Setting recommended pref browser.tabs.warnOnCloseOtherTabs to false
1650812114354   RemoteAgent     DEBUG   Setting recommended pref browser.tabs.warnOnOpen to false
1650812114354   RemoteAgent     DEBUG   Setting recommended pref browser.toolbars.bookmarks.visibility to never
1650812114354   RemoteAgent     DEBUG   Setting recommended pref browser.usedOnWindows10.introURL to
1650812114355   RemoteAgent     DEBUG   Setting recommended pref browser.urlbar.merino.endpointURL to
1650812114355   RemoteAgent     DEBUG   Setting recommended pref browser.urlbar.suggest.searches to false
1650812114356   RemoteAgent     DEBUG   Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1650812114356   RemoteAgent     DEBUG   Setting recommended pref dom.disable_open_during_load to false
1650812114356   RemoteAgent     DEBUG   Setting recommended pref dom.file.createInChild to true
1650812114356   RemoteAgent     DEBUG   Setting recommended pref dom.max_chrome_script_run_time to 0
1650812114357   RemoteAgent     DEBUG   Setting recommended pref dom.max_script_run_time to 0
1650812114357   RemoteAgent     DEBUG   Setting recommended pref dom.push.connection.enabled to false
1650812114358   RemoteAgent     DEBUG   Setting recommended pref dom.successive_dialog_time_limit to 0
1650812114358   RemoteAgent     DEBUG   Setting recommended pref extensions.getAddons.cache.enabled to false
1650812114358   RemoteAgent     DEBUG   Setting recommended pref extensions.getAddons.discovery.api_url to data:,
1650812114358   RemoteAgent     DEBUG   Setting recommended pref network.http.prompt-temp-redirect to false
1650812114358   RemoteAgent     DEBUG   Setting recommended pref privacy.trackingprotection.enabled to false
1650812114358   RemoteAgent     DEBUG   Setting recommended pref security.fileuri.strict_origin_policy to false
1650812114358   RemoteAgent     DEBUG   Setting recommended pref security.notification_enable_delay to 0
1650812114359   RemoteAgent     DEBUG   Setting recommended pref signon.autofillForms to false
1650812114360   RemoteAgent     DEBUG   Setting recommended pref signon.rememberSignons to false
1650812114361   RemoteAgent     DEBUG   Setting recommended pref browser.topsites.contile.enabled to false
1650812114362   RemoteAgent     DEBUG   Setting recommended pref browser.contentblocking.features.standard to -tp,tpPrivate,cookieBehavior0,-cm,-fp
1650812114362   RemoteAgent     DEBUG   Setting recommended pref network.cookie.cookieBehavior to 0
1650812114366   Marionette      TRACE   Received observer notification marionette-startup-requested
1650812114366   Marionette      TRACE   Waiting until startup recorder finished recording startup scripts...
DevTools listening on ws://localhost:35320/devtools/browser/8684718d-e21c-41a8-9b02-dd3931809276
DEBUG: Completed blocker Transaction (5) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: Bookmarks.jsm: insertBookmarkTree (6) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: GuidHelper.getItemId (7) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: GuidHelper.getItemId (7) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: Bookmarks.jsm: fetchBookmark (8) for phase places.sqlite#1: waiting for clients
1650812114385   Marionette      TRACE   All scripts recorded.
1650812114385   RemoteAgent     DEBUG   Setting recommended pref dom.disable_beforeunload to true
1650812114387   Marionette      INFO    Listening on port 37095
1650812114387   Marionette      DEBUG   Marionette is listening
DEBUG: Adding blocker DownloadAutoSaveView: writing data for phase profile-before-change
1650812114407   Marionette      DEBUG   Accepted connection 0 from 127.0.0.1:46738
DEBUG: Completed blocker places.sqlite#1: Bookmarks.jsm: fetchBookmark (8) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker Transaction (9) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: Bookmarks.jsm: insertBookmarkTree (10) for phase places.sqlite#1: waiting for clients
1650812114409   geckodriver::marionette DEBUG   Connection to Marionette established on 127.0.0.1:37095.
1650812114415   Marionette      DEBUG   0 -> [0,1,"WebDriver:NewSession",{"acceptInsecureCerts":true,"browserName":"firefox","se:noVncPort":7900,"se:vncEnabled":true}]
1650812114418   RemoteAgent     WARN    TLS certificate errors will be ignored for this session
1650812114424   RemoteAgent     TRACE   [17] Document already finished loading: about:blank
1650812114427   Marionette      DEBUG   0 <- [1,1,null,{"sessionId":"11fbb1c2-42a3-4b7b-9a25-eef30a868dc0","capabilities":{"browserName":"firefox","browserVersion":"99.0" ... "moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"se:noVncPort":7900,"se:vncEnabled":true,"proxy":{}}}]
1650812114432   webdriver::server       DEBUG   <- 200 OK {"value":{"sessionId":"11fbb1c2-42a3-4b7b-9a25-eef30a868dc0","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"99.0","moz:accessibilityChecks":false,"moz:buildID":"20220330194208","moz:debuggerAddress":"localhost:35320","moz:geckodriverVersion":"0.30.0","moz:headless":false,"moz:processID":851,"moz:profile":"/tmp/rust_mozprofilen3PXsv","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"pageLoadStrategy":"normal","platformName":"linux","platformVersion":"4.19.104-microsoft-standard","proxy":{},"se:noVncPort":7900,"se:vncEnabled":true,"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}}
14:55:14.434 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
14:55:14.441 INFO [LocalDistributor.newSession] - Session created by the distributor. Id: 11fbb1c2-42a3-4b7b-9a25-eef30a868dc0, Caps: Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 99.0, moz:accessibilityChecks: false, moz:buildID: 20220330194208, moz:debuggerAddress: localhost:35320, moz:firefoxOptions: {args: [], log: {level: trace}, prefs: {toolkit.asyncshutdown.log: true}}, moz:geckodriverVersion: 0.30.0, moz:headless: false, moz:processID: 851, moz:profile: /tmp/rust_mozprofilen3PXsv, moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platformName: linux, platformVersion: 4.19.104-microsoft-standard, proxy: Proxy(), se:cdp: ws://172.17.0.2:4444/sessio..., se:cdpVersion: 85.0, se:noVncPort: 7900, se:vnc: ws://172.17.0.2:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
DEBUG: Adding blocker ScriptPreloader: Saving bytecode cache for phase xpcom-will-shutdown
DEBUG: Completed blocker Transaction (9) for phase places.sqlite#1: waiting for clients
DEBUG: Completed blocker places.sqlite#1: Bookmarks.jsm: insertBookmarkTree (10) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker places.sqlite#1: GuidHelper.getItemId (11) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker ContentParent: id=7ff1e0e2db00 for phase xpcom-will-shutdown
DEBUG: Adding blocker ContentParent: id=7ff1e0e2db00 for phase profile-before-change
DEBUG: Completed blocker places.sqlite#1: GuidHelper.getItemId (11) for phase places.sqlite#1: waiting for clients
DEBUG: Adding blocker Extension API disable handlers for [email protected] for phase profile-before-change
DEBUG: Adding blocker Uninstalling add-on: [email protected] for phase profile-change-teardown
DEBUG: Adding blocker Clear cache for [email protected] for phase profile-change-teardown
DEBUG: Adding blocker Clear ServiceWorkers for [email protected] for phase profile-change-teardown
DEBUG: Adding blocker JSON store: writing data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker Clear Extension Storage [email protected] (File Backend) for phase profile-change-teardown
DEBUG: Completed blocker Clear ServiceWorkers for [email protected] for phase profile-change-teardown
DEBUG: Completed blocker Clear cache for [email protected] for phase profile-change-teardown
DEBUG: Completed blocker Extension API disable handlers for [email protected] for phase profile-before-change
DEBUG: Completed blocker Clear Extension Storage [email protected] (File Backend) for phase profile-change-teardown
DEBUG: Completed blocker Uninstalling add-on: [email protected] for phase profile-change-teardown
DEBUG: Adding blocker DoHController: clear state and remove observers for phase profile-before-change
DEBUG: Adding blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Completed blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Adding blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
DEBUG: Completed blocker SessionFile: Finish writing Session Restore data for phase IOUtils: waiting for profileBeforeChange IO to complete
14:57:13.317 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "9c9c5855fb618537b2948adb73055e59","eventTime": 1650812233317053800,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "127.0.0.1:4444","http.method": "GET","http.request_content_length": "92","http.scheme": "HTTP","http.status_code": 405,"http.target": "\u002fsession\u002f11fbb1c2-42a3-4b7b-9a25-eef30a868dc0\u002fime\u002factivated","http.user_agent": "PostmanRuntime\u002f7.26.8"}}

14:57:18.511 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "b2311346511f9b065f72ff9a303ee0c3","eventTime": 1650812238511003300,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "127.0.0.1:4444","http.method": "POST","http.request_content_length": "92","http.scheme": "HTTP","http.status_code": 405,"http.target": "\u002fsession\u002f11fbb1c2-42a3-4b7b-9a25-eef30a868dc0\u002fime\u002factivated","http.user_agent": "PostmanRuntime\u002f7.26.8"}}

Operating System

Windows 10

Selenium version

4.1.2

What are the browser(s) and version(s) where you see this issue?

Firefox 99

What are the browser driver(s) and version(s) where you see this issue?

geckodriverVersion: 0.30.0

Are you using Selenium Grid?

4.1.3

alaahong avatar Apr 24 '22 15:04 alaahong

@alaahong, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar Apr 24 '22 15:04 github-actions[bot]

There's a lot I don't know about this functionality. The code is in the JsonHttpCommandHandler, so it is not w3c compliant. Based on that SO question saying it only worked on Firefox + Linux, and Firefox w/geckodriver has only implemented w3c compliant endpoints, that means that it must have only worked in the legacy/deprecated Firefox extension.

Since IME is its own spec, I think to support webdriver, it needs to implement its own extension commands https://w3c.github.io/webdriver/#dfn-extension-commands (similar to WebAuth - https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability)

My question here is where this issue is coming from. Are you trying to implement something with this?

titusfortner avatar Apr 24 '22 17:04 titusfortner

I think we want to just remove this (instead of marking it deprecated because it doesn't actually work anywhere right now), and maybe bring it to the attention of the other working group. I'll add this to the agenda for TLC meeting.

titusfortner avatar Apr 24 '22 17:04 titusfortner

Thanks Titus. Actually no specific usage on this. I'm trying to understand the scenarios of some Selenium excpetions at this moment. There are several exceptions Icannot find out the specific trigger scenario, But almost of them nobody can be triggered. As this question, two relative exceptions on IME which I cannot reproduce but someone mentioned official case could. As such a class without usage after searched, So just wonder if any expired. As all ignored in official test, I guess that no issue on 3rd drivers.发自我的iPhone------------------ Original ------------------From: Titus Fortner @.>Date: Mon,Apr 25,2022 1:20 AMTo: SeleniumHQ/selenium @.>Cc: ian zhang @.>, Mention @.>Subject: Re: [SeleniumHQ/selenium] [�� Bug]: HTTP method not allowed for IME (Issue #10573) There's a lot I don't know about this functionality. The code is in the JsonHttpCommandHandler, so it is not w3c compliant. Based on that SO question saying it only worked on Firefox + Linux, and Firefox w/geckodriver has only implemented w3c compliant endpoints, that means that it must have only worked in the legacy/deprecated Firefox extension. Since IME is its own spec, I think to support webdriver, it needs to implement its own extension commands https://w3c.github.io/webdriver/#dfn-extension-commands (similar to WebAuth - https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability) My question here is where this issue is coming from. Are you trying to implement something with this?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/SeleniumHQ/selenium/issues/10573#issuecomment-1107882534", "url": "https://github.com/SeleniumHQ/selenium/issues/10573#issuecomment-1107882534", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

alaahong avatar Apr 24 '22 17:04 alaahong

Yeah, I think we want to start actively removing this kind of code. Java implementation is way complex right now.

titusfortner avatar Apr 24 '22 18:04 titusfortner

Hi guys, Share my test result for your reference. I could use related to control Android IME.

test code: this.service.getWebDriver().manage().ime().isActivated(); this.service.getWebDriver().manage().ime().getActiveEngine(); this.service.getWebDriver().manage().ime().getAvailableEngines();

result: image

image

some appium log:

[HTTP] --> GET /wd/hub/session/49c02c37-5d7b-42d6-a5bb-13ef06f31405/ime/activated [HTTP] {} [W3C (49c02c37)] Calling AppiumDriver.isIMEActivated() with args: ["49c02c37-5d7b-42d6-a5bb-13ef06f31405"] [W3C (49c02c37)] Responding to client with driver.isIMEActivated() result: true [HTTP] <-- GET /wd/hub/session/49c02c37-5d7b-42d6-a5bb-13ef06f31405/ime/activated 200 1 ms - 14 [HTTP] [HTTP] --> GET /wd/hub/session/49c02c37-5d7b-42d6-a5bb-13ef06f31405/ime/active_engine [HTTP] {} [W3C (49c02c37)] Calling AppiumDriver.getActiveIMEEngine() with args: ["49c02c37-5d7b-42d6-a5bb-13ef06f31405"] [AndroidDriver] Retrieving current default IME [ADB] Running '/Users/xxxx/Documents/sdk/platform-tools/adb -P 5037 -s RFCN90HLQAP shell settings get secure default_input_method' [W3C (49c02c37)] Responding to client with driver.getActiveIMEEngine() result: "com.samsung.android.honeyboard/.service.HoneyBoardService" [HTTP] <-- GET /wd/hub/session/49c02c37-5d7b-42d6-a5bb-13ef06f31405/ime/active_engine 200 88 ms - 69

kaola89 avatar Apr 26 '22 16:04 kaola89

Yeah, I think we want to start actively removing this kind of code. Java implementation is way complex right now.

@titusfortner , as above investigated, seems Appium implement IME based on ADB at Android side, I guess they just do this as existing JWP interface. So what's the Selenium opinion? To remove IME directly as non-W3C defination or keep max compatible to submit this to W3C?

Thanks.

alaahong avatar Apr 27 '22 01:04 alaahong

@kaola89 was that done using only Selenium or using the Java Appium bindings?

diemol avatar May 10 '22 07:05 diemol

@diemol with Java Appium bindings.

kaola89 avatar May 11 '22 01:05 kaola89

In the project meeting held on May 11, 2022, we decided to remove this methods from the Selenium bindings as they do not work on browsers and are not part of W3C WebDriver. We chatted with the Appium team and created an issue in their repo to give them a heads up about the removal of it.

This issue will stay open to track the removal of that code from the Selenium repo.

https://github.com/SeleniumHQ/selenium/commit/2cdda1fa2b959ca084a4ecb10114b86f571b2986

diemol avatar May 12 '22 20:05 diemol

IME was removed, it won't be present in 4.5 (or in 4.4.1 if end up releasing a patch).

diemol avatar Aug 12 '22 08:08 diemol

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Sep 12 '22 00:09 github-actions[bot]