Skip to content

feat: add the Wincore driver and options - #2475

Open
mykola-mokhnach wants to merge 5 commits into
masterfrom
wincore
Open

mykola-mokhnach wants to merge 5 commits into
masterfrom
wincore

Conversation

@mykola-mokhnach

@mykola-mokhnach mykola-mokhnach commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

The Windows driver is deprecated and not supported since Appium 4. This adds a separate driver, options and screen recording options for its successor, appium-wincore-driver, and documents the Windows driver deprecation in the Javadoc and README.

What's added (io.appium.java_client.wincore)

  • AutomationName.WINCORE (Wincore).
  • WincoreDriver: same constructors, launchApp/closeApp and pullFile/pushFile as WindowsDriver.
    • Implements SupportsContextSwitching for WebView contexts.
    • pullFolder throws UnsupportedOperationException, as the driver has no such command.
    • The no-arg startRecordingScreen() delegates to the options overload, since the driver returns no value.
    • pullFile/pushFile require the wincore:modify_fs insecure feature on the server.
  • WincoreOptions (platform Windows, automation name Wincore). It reuses the existing windows.options interfaces for appArguments, appTopLevelWindow, appWorkingDir and prerun/postrun, and adds Wincore-specific interfaces for the other capabilities the driver reads:
    • ms:waitForAppLaunch, serialized the way the driver detects units: whole seconds up to 120 are sent as seconds, anything else as milliseconds;
    • shouldCloseApp, ms:forcequit, isolatedScriptExecution;
    • smoothPointerMove, delayBeforeClick, delayAfterClick;
    • webviewEnabled, webviewDevtoolsPort;
    • chromedriver/edgedriver executable path and CDN URL, ffmpegExecutablePath;
    • logFile, perfMetrics.
  • WincoreStart/StopScreenRecordingOptions. The start options send videoFps, whereas the Windows ones send fps.

Deliberately left out

  • systemPort and ms:experimental-webdriver: the driver ignores them (stdin/stdout IPC, no experimental switch).
  • appEnvironment: listed in the driver README, but nothing in the driver reads it.

Not changed

WindowsDriver, WindowsOptions and AutomationName.WINDOWS are only documented as deprecated, not annotated with @Deprecated yet. This is open for discussion in the review.

Tests

Options building, the wait-for-launch unit boundaries, and HTTP-level tests for file transfer, launchApp/closeApp, contexts and screen recording. No real-app E2E was run.

cc @y-schwab

🤖 Generated with Claude Code

The Windows driver is deprecated and not supported since Appium 4. Add
WincoreDriver, WincoreOptions and Wincore screen recording options for
its successor, appium-wincore-driver, and document the Windows driver
deprecation. The Wincore recording options send videoFps, whereas the
Windows ones send fps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
String MAC2 = "Mac2";
/** The automation name of the <a href="https://github.com/appium/appium-windows-driver">Windows driver</a>. */
/** The automation name of the <a href="https://github.com/appium/appium-windows-driver">Windows driver</a>, deprecated and not supported since Appium 4. */
String WINDOWS = "Windows";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String WINDOWS = "Windows";
@Deprecated
String WINDOWS = "Windows";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deliberately was avoiding marking this driver as deprecated before we release Appium4 from beta. However, the wincore driver already works just fine for v3.

@valfirst would you prefer to mark that stuff as deprecated now in the same PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecation doesn't block anything, it's just a notification. I would mark the old stuff as deprecated.

* <p>Note: appium-windows-driver is deprecated and not supported since Appium 4, use appium-wincore-driver instead,
* see {@link io.appium.java_client.wincore.options.WincoreOptions}.</p>
*/
public class WindowsOptions extends BaseOptions<WindowsOptions> implements

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class WindowsOptions extends BaseOptions<WindowsOptions> implements
@Deprecated
public class WindowsOptions extends BaseOptions<WindowsOptions> implements

* <p>Note: the Windows driver is deprecated and not supported since Appium 4,
* use {@link io.appium.java_client.wincore.WincoreDriver} instead.</p>
*/
public class WindowsDriver extends AppiumDriver implements

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class WindowsDriver extends AppiumDriver implements
@Deprecated
public class WindowsDriver extends AppiumDriver implements

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compared this change with appium-wincore-driver 3.1.2 (main at a5bac78). The 15 existing options/HTTP command tests pass locally; the inline comments cover three additional compatibility cases. Recording was checked with a mock HTTP response, and launch-wait conversion was checked against the server implementation; no real-app E2E was run.

Comment thread src/main/java/io/appium/java_client/wincore/WincoreDriver.java
Comment thread src/main/java/io/appium/java_client/wincore/WincoreDriver.java
Comment thread src/main/java/io/appium/java_client/wincore/options/WincoreOptions.java Outdated
- Override the no-arg startRecordingScreen to avoid an NPE on the empty
  response.
- Implement SupportsContextSwitching so WebView contexts and browser
  detection work.
- Serialize ms:waitForAppLaunch in the unit the driver expects: values up
  to 120 are seconds, greater values are milliseconds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two non-blocking documentation suggestions for Wincore setup.

SupportsWaitForAppLaunchOption<WincoreOptions>,
SupportsMsExperimentalWebDriverOption<WincoreOptions>,
SupportsMsForceQuitOption<WincoreOptions>,
SupportsSystemPortOption<WincoreOptions>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking documentation nit: could we clarify that systemPort has no effect for Wincore? The inherited Windows option describes configuring a server listener (default 4724), whereas Wincore explicitly ignores this capability because it uses stdin/stdout IPC. A Wincore-specific note would avoid misleading users migrating their session/port configuration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: WincoreOptions now documents that systemPort has no effect for Wincore (stdin/stdout IPC) and is kept only for compatibility with Windows driver configs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, removed systemPort from WincoreOptions since the driver ignores it.

}

/**
* Pulls a file from the remote system. The Wincore driver has no `mobile:` extension for it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking documentation nit: could the JavaDoc for both pullFile() and pushFile() mention that the Appium server must enable wincore:modify_fs, e.g. --allow-insecure=wincore:modify_fs? Both server handlers require this feature, so otherwise correctly formed calls are rejected. The command serialization here looks correct; this is just to make the setup requirement clear to users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: the pullFile() and pushFile() Javadoc now says the server must enable wincore:modify_fs, e.g. --allow-insecure=wincore:modify_fs.

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

mykola-mokhnach and others added 3 commits October 12, 2026 23:51
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oreOptions

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants