Skip to content

[🚀 Feature]: Implement Selenium Manager .NET non-windows #11214

@titusfortner

Description

@titusfortner

Feature and motivation

.NET Framework did not differentiate between Linux & Mac, so there is no good way to ensure the right selenium-manager is used in .NET.

It's theoretically possible to use methods like:

RuntimeInformation.IsOSPlatform(OSPlatform.OSX);

with:

using System.Runtime.InteropServices;

But we'd have to restrict it to .NET Framework 4.71+
https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation?view=net-6.0#applies-to

AND. I can't even get the IDE to recognize it, let alone bazel.

Usage example

                    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
                    {
                        binary = "selenium-manager/windows/selenium-manager.exe";
                    }
                    else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
                    {
                        binary = "selenium-manager/linux/selenium-manager";
                    }
                    else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
                    {
                        binary = "selenium-manager/macos/selenium-manager";
                    }
                    else
                    {
                        throw new WebDriverException("Selenium Manager did not find supported operating system");
                    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions