Skip to content

AppiumDriver.setSetting fails with org.openqa.selenium.UnsupportedCommandException #2428

Description

@joerg1985

Calling AppiumDriver.setSetting fails with org.openqa.selenium.UnsupportedCommandException.

Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: setSettings
Build info: version: '4.46.0', revision: 'df5a634 df5a6341cbb5f8f06b836bd595752775627c80dc'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '25.0.1'
...
	at org.openqa.selenium.remote.codec.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:234)
	at org.openqa.selenium.remote.codec.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:112)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:186)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:243)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:626)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:708)
	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:225)
	at io.appium.java_client.CommandExecutionHelper.execute(CommandExecutionHelper.java:36)
	at io.appium.java_client.HasSettings.setSetting(HasSettings.java:54)
	at io.appium.java_client.HasSettings.setSetting(HasSettings.java:41)

I think the AppiumW3CHttpCommandCodec is missing the defineCommand calls for GET_SETTINGS / SET_SETTINGS.
This i my local workaround to fix this, but it would be nice to get this fixed upstream.

            commandCodec.defineCommand("getSettings", HttpMethod.GET, "/session/:sessionId/appium/settings");
            commandCodec.defineCommand("updateSettings", HttpMethod.POST, "/session/:sessionId/appium/settings");
            commandCodec.alias("setSettings", "updateSettings");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions