Repository navigation
feat: add the Wincore driver and options - #2475
mykola-mokhnach wants to merge 5 commits into
Conversation
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"; |
There was a problem hiding this comment.
| String WINDOWS = "Windows"; | |
| @Deprecated | |
| String WINDOWS = "Windows"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| public class WindowsDriver extends AppiumDriver implements | |
| @Deprecated | |
| public class WindowsDriver extends AppiumDriver implements |
KazuCocoa
left a comment
There was a problem hiding this comment.
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.
- 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
left a comment
There was a problem hiding this comment.
Two non-blocking documentation suggestions for Wincore setup.
| SupportsWaitForAppLaunchOption<WincoreOptions>, | ||
| SupportsMsExperimentalWebDriverOption<WincoreOptions>, | ||
| SupportsMsForceQuitOption<WincoreOptions>, | ||
| SupportsSystemPortOption<WincoreOptions>, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Done: WincoreOptions now documents that systemPort has no effect for Wincore (stdin/stdout IPC) and is kept only for compatibility with Windows driver configs.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Done: the pullFile() and pushFile() Javadoc now says the server must enable wincore:modify_fs, e.g. --allow-insecure=wincore:modify_fs.
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>
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/closeAppandpullFile/pushFileasWindowsDriver.SupportsContextSwitchingfor WebView contexts.pullFolderthrowsUnsupportedOperationException, as the driver has no such command.startRecordingScreen()delegates to the options overload, since the driver returns no value.pullFile/pushFilerequire thewincore:modify_fsinsecure feature on the server.WincoreOptions(platformWindows, automation nameWincore). It reuses the existingwindows.optionsinterfaces forappArguments,appTopLevelWindow,appWorkingDirand 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;ffmpegExecutablePath;logFile,perfMetrics.WincoreStart/StopScreenRecordingOptions. The start options sendvideoFps, whereas the Windows ones sendfps.Deliberately left out
systemPortandms: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,WindowsOptionsandAutomationName.WINDOWSare only documented as deprecated, not annotated with@Deprecatedyet. 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