File tree 1 file changed +8
-9
lines changed
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -40,26 +40,25 @@ static SeleniumManager()
40
40
{
41
41
var currentDirectory = AppContext . BaseDirectory ;
42
42
43
- string file = "selenium-manager" ;
44
- string binary = $ "selenium-manager/linux/{ file } ";
45
-
46
43
if ( Environment . GetEnvironmentVariable ( "SE_MANAGER_PATH" ) != null )
47
44
{
48
45
binaryFullPath = Environment . GetEnvironmentVariable ( "SE_MANAGER_PATH" ) ;
49
46
}
50
47
else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
51
48
{
52
- file = "selenium-manager.exe" ;
53
- binary = $ "selenium-manager/windows/{ file } ";
49
+ binaryFullPath = Path . Combine ( currentDirectory , "selenium-manager\\ windows\\ selenium-manager.exe" ) ;
50
+ }
51
+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
52
+ {
53
+ binaryFullPath = Path . Combine ( currentDirectory , "selenium-manager\\ linux\\ selenium-manager" ) ;
54
54
}
55
55
else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
56
56
{
57
- binary = $ "selenium-manager/ macos/ { file } " ;
57
+ binaryFullPath = Path . Combine ( currentDirectory , "selenium-manager\\ macos\\ selenium-manager" ) ;
58
58
}
59
-
60
- if ( binaryFullPath == null )
59
+ else
61
60
{
62
- binaryFullPath = Path . Combine ( currentDirectory , binary ) ;
61
+ throw new PlatformNotSupportedException ( $ "Selenium Manager doesn't support your runtime platform: { RuntimeInformation . OSDescription } " ) ;
63
62
}
64
63
65
64
if ( ! File . Exists ( binaryFullPath ) )
You can’t perform that action at this time.
0 commit comments