You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(windows): add WincoreDriver and screen recording options - #1159
Add AutomationName.Wincore ("Wincore") and WincoreDriver under OpenQA.Selenium.Appium.Windows, defaulting PlatformName and AutomationName only when unset.
Mark AppiumDriver screen recording methods virtual and override them in WincoreDriver to call windows: startRecordingScreen and windows: stopRecordingScreen.
The documented appium driver install wincore command fails because wincore is not in Appium's KNOWN_DRIVERS registry; short-name installation rejects unrecognized names. Use appium driver install --source=npm appium-wincore-driver, as documented in the linked driver's README, so users can install the server-side driver required by WincoreDriver.
Rebased onto latest main now that #1160 is merged and added WincoreDriver_ExecutesCommandsOverMockAppiumServerHttp covering WincoreDriver commands (LaunchApp, CloseApp, StartRecordingScreen, and StopRecordingScreen with upload options) against MockAppiumServer.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, the structure lines up well with the Java client's WincoreDriver. A few things before it can merge:
Blocking
Screen recording won't reach Wincore.StartRecordingScreen/StopRecordingScreen POST to /appium/start_recording_screen and /appium/stop_recording_screen. Appium 3 moved those routes into the individual drivers. Wincore doesn't register them and only exposes windows: startRecordingScreen / windows: stopRecordingScreen (its own e2e tests use those). Suggest making the base recording overloads virtual and overriding them in WincoreDriver to call ExecuteScript("windows: …", options.GetParameters()).
Start options: Wincore's start command ignores upload options (only stop uploads) and defaults forceRestart to true. Please drop the upload assertions from the start tests. Consider exposing outputPath.
New warnings:[Obsolete] on WindowsDriver adds CS0618 warnings in test/integration/Windows/*. Please migrate those tests to WincoreDriver or suppress the warning there.
CI: the Android failure (TouchByCoordinatesTestCase, stale element) is the flake fixed in #1143. A rebase on main should clear it.
Nits
Settings/SetSetting aren't in #1154 and they depend on AndroidCommandExecutionHelper. Drop them, or implement IHasSettings.
Keep one factory (GetWincore… or StartScreenRecordingOptions) and one of WithFps/WithVideoFps. Remove the new WithTimeLimit, which only repeats the base method.
LaunchApp/CloseApp can be one-liners: => ExecuteScript("windows: launchApp");
using OpenQA.Selenium.Appium.Interfaces; in WincoreDriver.cs is unused.
Please revert the BOM removal on the 4 existing files.
Initializing ScreenRecordingUploadOptions.Parameters fixes a crash that already happens on main. Worth calling out in the description.
Done in 3c71226 after rebasing onto main: marked AppiumDriver recording overloads virtual and overrode them in WincoreDriver to invoke windows: startRecordingScreen and windows: stopRecordingScreen, and removed start upload assertions.
Also added WithOutputPath and DisableForcedRestart, trimmed duplicate helpers, dropped Settings/SetSetting, restored the 4 BOMs, suppressed CS0618 in legacy Windows tests, and updated the PR description.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround. Routing recording through windows: startRecordingScreen / windows: stopRecordingScreen looks good, and the rest of the feedback is addressed. CI is green and the build has no new warnings.
Optional nits, fine as a follow-up:
WincoreDriverTests could reuse the existing MockCommandExecutor instead of defining its own.
The Platform field is used once and could be inlined.
The reason will be displayed to describe this comment to others. Learn more.
Inheriting WithUploadOptions() here lets callers configure an upload that never happens. Wincore accepts remotePath, user, pass, and method only on windows: stopRecordingScreen. If a caller sets the destination on start and then calls StopRecordingScreen() without options, the server returns the video inline. Could we expose upload configuration only on the Wincore stop options? Server command parameters
The reason will be displayed to describe this comment to others. Learn more.
Updated WincoreStartScreenRecordingOptions in f25848c to implement IScreenRecordingOptions directly instead of BaseStartScreenRecordingOptions, leaving upload options only on WincoreStopScreenRecordingOptions.
The reason will be displayed to describe this comment to others. Learn more.
Wincore requires outputPath to be a full .mp4 filename. Passing C:\videos, as the mock tests do, raises InvalidArgumentError on the server. Could we update the XML summary, parameter description, and test examples to use a path such as C:\videos\capture.mp4? Server validation
The reason will be displayed to describe this comment to others. Learn more.
All constructors accept DriverOptions, but this type check skips the appium:automationName default for other implementations. For example, passing EdgeOptions without an explicit automation name sends a session request that Appium cannot route to Wincore. Could we apply the default whenever the outgoing capabilities lack it, or narrow the constructors to AppiumOptions if that is the intended contract?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #1154
List of changes
AutomationName.Wincore("Wincore") andWincoreDriverunder OpenQA.Selenium.Appium.Windows, defaulting PlatformName and AutomationName only when unset.AppiumDriverscreen recording methods virtual and override them in WincoreDriver to callwindows: startRecordingScreenandwindows: stopRecordingScreen.WincoreStartScreenRecordingOptions(outputPath, videoFps, captureCursor, captureClicks, audioInput, videoFilter, preset, timeLimit, forceRestart) andWincoreStopScreenRecordingOptions.ScreenRecordingUploadOptions.Parameters, fixing a NullReferenceException that already occurs on main.LaunchApp(),CloseApp(), PullFile, PushFile, and WebView Context/Contexts, throwing NotSupportedException on PullFolder.WindowsDriveras obsolete in favor of WincoreDriver, with CS0618 suppressed in the legacy Windows integration tests.WincoreDriverTests.Types of changes
Tests
How they run: Picked up by the Tests.Driver filter in unit-test.yml.
Documentation