Skip to content

Commit

Permalink
[dotnet] fix the framework conditionals for Selenium Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Nov 3, 2022
1 parent 73f9351 commit 7be7e2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dotnet/src/webdriver/SeleniumManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using System.Collections.Generic;
using System.Diagnostics;

#if !NETFRAMEWORK
#if !NET45 && !NET46 && !NET47
using System.Runtime.InteropServices;
#endif

Expand Down Expand Up @@ -70,7 +70,7 @@ private static string Binary
{
if (string.IsNullOrEmpty(binary))
{
#if NETFRAMEWORK
#if NET45 || NET46 || NET47
binary = "selenium-manager/windows/selenium-manager.exe";

This comment has been minimized.

Copy link
@nvborisenko

nvborisenko Nov 3, 2022

Member

Then we need one more condition: Environment.OSVersion.Platform == PlatformID.Unix

This comment has been minimized.

Copy link
@titusfortner

titusfortner Nov 8, 2022

Author Member

I didn't see one when I looked at the code. I see it is in the documentation, though. https://learn.microsoft.com/en-us/dotnet/api/system.platformid?view=net-7.0

#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down

0 comments on commit 7be7e2e

Please sign in to comment.