Skip to content

Commit

Permalink
Added more logging information for linux tests debugging on GitHub Ac…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
quigamdev committed Jun 3, 2024
1 parent afdb673 commit 365e46b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static FirefoxOptions GetFirefoxOptions(System.Collections.Generic.IDicti
{
// Profile = GetFirefoxProfile()
};

//options.BrowserVersion = _options.TryGet(nameof(options.BrowserVersion));
options.BrowserVersion = _options.TryGet(nameof(options.BrowserVersion));
Console.WriteLine($"Requesting {options.BrowserVersion} version of browser");
return options;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using OpenQA.Selenium;

[TestClass]
public class SeleniumManagerTests
{
[TestMethod]
public void GetBinariesVersion104()
{
var data1 = SeleniumManager.BinaryPaths("--browser firefox --driver geckodriver --browser-version 104");
Console.WriteLine("Firefox binaries: " + JsonConvert.SerializeObject(data1));
Assert.IsNotNull(data1["browser_path"]);
Assert.IsNotNull(data1["driver_path"]);

var data2 = SeleniumManager.BinaryPaths("--browser chrome --driver chromedriver --browser-version 104");
Console.WriteLine("Chrome binaries: " + JsonConvert.SerializeObject(data2));
Assert.IsNotNull(data2["browser_path"]);
Assert.IsNotNull(data2["driver_path"]);
}

[TestMethod]
public void GetBinariesVersionStable()
{
var data1 = SeleniumManager.BinaryPaths("--browser firefox --driver geckodriver --browser-version stable");
Console.WriteLine("Firefox binaries: " + JsonConvert.SerializeObject(data1));
Assert.IsNotNull(data1["browser_path"]);
Assert.IsNotNull(data1["driver_path"]);

var data2 = SeleniumManager.BinaryPaths("--browser chrome --driver chromedriver --browser-version stable");
Console.WriteLine("Chrome binaries: " + JsonConvert.SerializeObject(data2));
Assert.IsNotNull(data2["browser_path"]);
Assert.IsNotNull(data2["driver_path"]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,5 @@ public void GetBinaries()
Console.WriteLine("Chrome binaries: " + JsonSerializer.Serialize(data2));
Assert.IsNotNull(data2["browser_path"]);
Assert.IsNotNull(data2["driver_path"]);



}

}

0 comments on commit 365e46b

Please sign in to comment.