Repository navigation
feat: add the Wincore driver and options - #2475
mykola-mokhnach wants to merge 7 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.
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>
Mark WindowsDriver, WindowsOptions and AutomationName.WINDOWS as deprecated in favor of their Wincore counterparts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The remaining windows.options classes (PowerShellData and the app arguments, top-level window and working dir options) stay as they are shared with WincoreOptions. 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 deprecates the Windows driver classes.
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.Deprecated
WindowsDriver,WindowsOptions,AutomationName.WINDOWS, the Windows screen recording options and the Windows-only capability interfaces (createSessionTimeout,ms:experimental-webdriver,ms:waitForAppLaunch,systemPort) are marked@Deprecatedand point to their Wincore counterparts.PowerShellDataand the app arguments, top-level window and working dir interfaces inwindows.optionsare shared withWincoreOptions, so they are not deprecated.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