diff --git a/WebDriverManager.Tests/LegacyEdgeConfigTests.cs b/WebDriverManager.Tests/LegacyEdgeConfigTests.cs
new file mode 100644
index 0000000..cf9ad34
--- /dev/null
+++ b/WebDriverManager.Tests/LegacyEdgeConfigTests.cs
@@ -0,0 +1,25 @@
+using System.Text.RegularExpressions;
+using WebDriverManager.DriverConfigs.Impl;
+using Xunit;
+
+namespace WebDriverManager.Tests
+{
+ public class LegacyEdgeConfigTests : LegacyEdgeConfig
+ {
+ [Fact]
+ public void VersionTest()
+ {
+ var version = GetLatestVersion();
+ var regex = new Regex(@"^\d+\.\d+$");
+ Assert.NotEmpty(version);
+ Assert.Matches(regex, version);
+ }
+
+ [Fact]
+ public void DriverDownloadTest()
+ {
+ new DriverManager().SetUpDriver(new LegacyEdgeConfig());
+ Assert.NotEmpty(WebDriverFinder.FindFile(GetBinaryName()));
+ }
+ }
+}
diff --git a/WebDriverManager/DriverConfigs/Impl/LegacyEdgeConfig.cs b/WebDriverManager/DriverConfigs/Impl/LegacyEdgeConfig.cs
new file mode 100644
index 0000000..a88cbce
--- /dev/null
+++ b/WebDriverManager/DriverConfigs/Impl/LegacyEdgeConfig.cs
@@ -0,0 +1,31 @@
+namespace WebDriverManager.DriverConfigs.Impl
+{
+ public class LegacyEdgeConfig : IDriverConfig
+ {
+ public virtual string GetName()
+ {
+ return "Edge";
+ }
+
+ public virtual string GetUrl32()
+ {
+ return
+ "https://download.microsoft.com/download/F/8/A/F8AF50AB-3C3A-4BC4-8773-DC27B32988DD/MicrosoftWebDriver.exe";
+ }
+
+ public virtual string GetUrl64()
+ {
+ return GetUrl32();
+ }
+
+ public virtual string GetBinaryName()
+ {
+ return "MicrosoftWebDriver.exe";
+ }
+
+ public virtual string GetLatestVersion()
+ {
+ return "6.17134";
+ }
+ }
+}
diff --git a/WebDriverManager/Services/Impl/BinaryService.cs b/WebDriverManager/Services/Impl/BinaryService.cs
index 8b73125..d4f4318 100644
--- a/WebDriverManager/Services/Impl/BinaryService.cs
+++ b/WebDriverManager/Services/Impl/BinaryService.cs
@@ -18,11 +18,16 @@ public string SetupBinary(string url, string zipDestination, string binDestinati
FileHelper.CreateDestinationDirectory(zipDestination);
zipDestination = DownloadZip(url, zipDestination);
FileHelper.CreateDestinationDirectory(binDestination);
- if (!zipDestination.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
+
+ if (zipDestination.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
+ {
+ File.Copy(zipDestination, binDestination);
+ }
+ else
{
- binDestination = UnZip(zipDestination, binDestination, binaryName);
+ UnZip(zipDestination, binDestination, binaryName);
}
-
+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
diff --git a/WebDriverManager/WebDriverManager.csproj b/WebDriverManager/WebDriverManager.csproj
index 43b40b0..106cf7f 100644
--- a/WebDriverManager/WebDriverManager.csproj
+++ b/WebDriverManager/WebDriverManager.csproj
@@ -3,7 +3,7 @@
netstandard2.0
true
- 2.6.0
+ 2.7.0
WebDriverManager.Net
Automatic Selenium WebDriver binaries management for .Net
© 2016-2019, Aliaksandr Rasolka. All Rights Reserved.
@@ -12,7 +12,7 @@
https://github.com/rosolko/WebDriverManager.Net
git
Selenium WebDriver ChromeDriver EdgeDriver InternetExplorerDriver MarionetteDriver OperaDriver PhantomJsDriver
- Correctly get lavetst edge version
+ Add support of legacy (non chromium) edge
diff --git a/appveyor.yml b/appveyor.yml
index 538e674..167f47a 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,7 +3,7 @@ version: '{build}'
image: Visual Studio 2017
environment:
- LIBRARY_VERSION: '2.6.0'
+ LIBRARY_VERSION: '2.7.0'
SONAR_LOGIN:
secure: JNopXLZtkO5PD8yEj2+W1BZnbhq9oegXmTFgvVWQw67z5PtWwd+ngjv5O7xFetCZ