Skip to content

Commit 42ee0b6

Browse files
committed
Adding ToString override to .NET Platform class
Fixes issue #580.
1 parent d381682 commit 42ee0b6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

dotnet/src/webdriver/Firefox/Internal/Executable.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public Executable(string userSpecifiedBinaryPath)
7070
}
7171

7272
throw new WebDriverException("Cannot find Firefox binary in PATH or default install locations. " +
73-
"Make sure Firefox is installed. OS appears to be: " + Platform.CurrentPlatform);
73+
"Make sure Firefox is installed. OS appears to be: " + Platform.CurrentPlatform.ToString());
7474
}
7575
#endregion
7676

dotnet/src/webdriver/Platform.cs

+9
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,14 @@ public bool IsPlatformType(PlatformType compareTo)
204204

205205
return platformIsType;
206206
}
207+
208+
/// <summary>
209+
/// Returns the string value for this platform type.
210+
/// </summary>
211+
/// <returns>The string value for this platform type.</returns>
212+
public override string ToString()
213+
{
214+
return this.platformTypeValue.ToString();
215+
}
207216
}
208217
}

0 commit comments

Comments
 (0)