Description
Description
Include support for MacCatalyst/MAUI projects.
When using MAUI under windows SeleniumManager works as expected, driver is downloaded and allows selenium to create the driver instance.
But when building for MacOS the following error is displayed:
System.PlatformNotSupportedException: Selenium Manager doesn't support your runtime platform: Darwin 24.2.0 Darwin Kernel Version 24.2.0
This seems to be related to this issue on dotnet runtime: IsOSPlatform(OSPlatform.OSX) returns false when using MAUI on Mac (MacCatalyst) #104160
Per report IsOSPlatform(OSPlatform.OSX) returns false when MacCatalyst is used.
Such validation is used here in: SeleniumManagner.CS
Please refer to this repo to reproduce issue: SeleniumMauiTest
While experimenting, it seems using OperatingSystem.IsMacCatalyst(), returns true which will allow to identify the platform, and can be used as a workaround.
https://github.com/mtorres10/SeleniumMauiTest/blob/5d4ffa131776548a64974173bbba7f33359d6389/Selenium/MainPage.xaml.cs#L29C4-L29C89
For reference this seems to be the original feature where Selenium Manager supporting non windows was implemented originally: [🚀 Feature]: Implement Selenium Manager .NET non-windows
Have you considered any alternatives or workarounds?
Workaround is to manually download driver and conditionally point to binary when running under MacOS MacCatalyst.
Tried WebDriverManager.Net and it fails as well when used with MAUI/MacCatalyst.