Skip to content

Commit

Permalink
Update latest version match for git based configs
Browse files Browse the repository at this point in the history
  • Loading branch information
rosolko committed Jun 26, 2023
1 parent 924f631 commit e06e019
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WebDriverManager.Tests/InternetExplorerConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void VersionTest()
Assert.Matches(regex, version);
}

[Fact(Skip = "The remote server returned an error: (404) Not Found")]
[Fact]
public void DriverDownloadTest()
{
new DriverManager().SetUpDriver(new InternetExplorerConfig());
Expand Down
4 changes: 2 additions & 2 deletions WebDriverManager/DriverConfigs/Impl/FirefoxConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public virtual string GetLatestVersion()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
using (var client = new WebClient())
{
var htmlCode = client.DownloadString("https://github.com/mozilla/geckodriver/releases");
var htmlCode = client.DownloadString("https://github.com/mozilla/geckodriver/releases/latest");
var parser = new HtmlParser();
var document = parser.ParseDocument(htmlCode);
var version = document.QuerySelectorAll("[class='Link--primary']")
var version = document.QuerySelectorAll("h1.d-inline")
.Select(element => element.TextContent)
.FirstOrDefault()
?.Trim(' ', '\r', '\n');
Expand Down
4 changes: 2 additions & 2 deletions WebDriverManager/DriverConfigs/Impl/InternetExplorerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public virtual string GetLatestVersion()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
using (var client = new WebClient())
{
var htmlCode = client.DownloadString("https://github.com/SeleniumHQ/selenium/releases");
var htmlCode = client.DownloadString("https://github.com/SeleniumHQ/selenium/releases/latest");
var parser = new HtmlParser();
var document = parser.ParseDocument(htmlCode);
var version = document.QuerySelectorAll("[class='Link--primary']")
var version = document.QuerySelectorAll("h1.d-inline")
.Select(element => element.TextContent)
.FirstOrDefault()
?.Replace("Selenium", "")
Expand Down
4 changes: 2 additions & 2 deletions WebDriverManager/DriverConfigs/Impl/OperaConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public virtual string GetLatestVersion()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
using (var client = new WebClient())
{
var htmlCode = client.DownloadString("https://github.com/operasoftware/operachromiumdriver/releases");
var htmlCode = client.DownloadString("https://github.com/operasoftware/operachromiumdriver/releases/latest");
var parser = new HtmlParser();
var document = parser.ParseDocument(htmlCode);
var version = document.QuerySelectorAll("[class='Link--primary']")
var version = document.QuerySelectorAll("h1.d-inline")
.Select(element => element.TextContent)
.FirstOrDefault()
?.Trim(' ', '\r', '\n');
Expand Down

0 comments on commit e06e019

Please sign in to comment.