Skip to content

Commit

Permalink
Added test for SeleniumManager
Browse files Browse the repository at this point in the history
  • Loading branch information
quigamdev committed Jun 3, 2024
1 parent 54878f9 commit 892d598
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"factories": {
//"chrome:fast": {
// "capabilities": [ "--no-sandbox" ],
//"Options": {
// "BrowserVersion": "124"
//},
//},
"firefox:fast": {
"chrome:fast": {
"capabilities": [ "--window-size=1920,1080", "--headless", "--disable-gpu" ],
"Options": {
"BrowserVersion": "104"
"BrowserVersion": "124"
}
}
},
//"firefox:fast": {
// "Options": {
// "BrowserVersion": "104"
// }
//}
//"chrome:coordinator": {
// "options": {
// "coordinatorUrl": "http://localhost:62242/"
Expand Down
26 changes: 26 additions & 0 deletions src/Tests/Riganti.Selenium.Core.UnitTests/SeleniumManagerTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Text.Json;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;

[TestClass]
public class SeleniumManagerTests
{
[TestMethod]
public void GetBinaries()
{
var data1 = SeleniumManager.BinaryPaths("--browser firefox --driver geckodriver --browser-version 104");
Console.WriteLine("Firefox binaries: " + JsonSerializer.Serialize(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: " + JsonSerializer.Serialize(data2));
Assert.IsNotNull(data2["browser_path"]);
Assert.IsNotNull(data2["driver_path"]);



}

}

0 comments on commit 892d598

Please sign in to comment.