Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dotnet/paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ nuget Humanizer.Core 2.8.26
nuget Microsoft.Extensions.DependencyInjection 3.1.9
nuget Moq 4.20.72
nuget NETStandard.Library 2.0.3
nuget Newtonsoft.Json 13.0.1
nuget NUnit 3.13.2
nuget NUnitLite 3.13.2
nuget System.Text.Json 8.0.5
Expand Down
1 change: 0 additions & 1 deletion dotnet/paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ NUGET
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (== net462) (&& (== net8.0) (>= net462)) (&& (== net8.0) (< netstandard2.1)) (== netstandard2.0)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
Newtonsoft.Json (13.0.1)
NUnit (3.13.2)
NETStandard.Library (>= 2.0) - restriction: || (&& (== net462) (< net35) (>= netstandard2.0)) (== net8.0) (== netstandard2.0)
NUnitLite (3.13.2)
Expand Down
1 change: 0 additions & 1 deletion dotnet/paket.nuget.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def nuget():
{"name": "Microsoft.NETCore.Platforms", "id": "Microsoft.NETCore.Platforms", "version": "1.1.0", "sha512": "sha512-a/iSwnRZb+LHFk49hQOyThh/ZNC3vsbZsF65XwQIb863qF6msmhdQtxGXFL28Ob2NsCz/drEj28BJd/YPpLRBg==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "Moq", "id": "Moq", "version": "4.20.72", "sha512": "sha512-HeLdAKzFe2G4fUg+tUa1WRf/Mye9zbkiv57jHRSb5IVi7GXVPgWbbEaUP8SaOpt43JJFRlWY9N5Yro32/tgRpQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net462": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net47": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net471": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net472": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net48": ["Castle.Core", "System.Threading.Tasks.Extensions"], "net5.0": ["Castle.Core"], "net6.0": ["Castle.Core"], "net7.0": ["Castle.Core"], "net8.0": ["Castle.Core"], "net9.0": ["Castle.Core"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["Castle.Core", "System.Threading.Tasks.Extensions"], "netcoreapp2.1": ["Castle.Core", "System.Threading.Tasks.Extensions"], "netcoreapp2.2": ["Castle.Core", "System.Threading.Tasks.Extensions"], "netcoreapp3.0": ["Castle.Core"], "netcoreapp3.1": ["Castle.Core"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["Castle.Core", "System.Threading.Tasks.Extensions"], "netstandard2.1": ["Castle.Core"]}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "NETStandard.Library", "id": "NETStandard.Library", "version": "2.0.3", "sha512": "sha512-548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": ["Microsoft.NETCore.Platforms"], "net451": ["Microsoft.NETCore.Platforms"], "net452": ["Microsoft.NETCore.Platforms"], "net46": ["Microsoft.NETCore.Platforms"], "net461": ["Microsoft.NETCore.Platforms"], "net462": ["Microsoft.NETCore.Platforms"], "net47": ["Microsoft.NETCore.Platforms"], "net471": ["Microsoft.NETCore.Platforms"], "net472": ["Microsoft.NETCore.Platforms"], "net48": ["Microsoft.NETCore.Platforms"], "net5.0": ["Microsoft.NETCore.Platforms"], "net6.0": ["Microsoft.NETCore.Platforms"], "net7.0": ["Microsoft.NETCore.Platforms"], "net8.0": ["Microsoft.NETCore.Platforms"], "net9.0": ["Microsoft.NETCore.Platforms"], "netcoreapp1.0": ["Microsoft.NETCore.Platforms"], "netcoreapp1.1": ["Microsoft.NETCore.Platforms"], "netcoreapp2.0": ["Microsoft.NETCore.Platforms"], "netcoreapp2.1": ["Microsoft.NETCore.Platforms"], "netcoreapp2.2": ["Microsoft.NETCore.Platforms"], "netcoreapp3.0": ["Microsoft.NETCore.Platforms"], "netcoreapp3.1": ["Microsoft.NETCore.Platforms"], "netstandard": [], "netstandard1.0": ["Microsoft.NETCore.Platforms"], "netstandard1.1": ["Microsoft.NETCore.Platforms"], "netstandard1.2": ["Microsoft.NETCore.Platforms"], "netstandard1.3": ["Microsoft.NETCore.Platforms"], "netstandard1.4": ["Microsoft.NETCore.Platforms"], "netstandard1.5": ["Microsoft.NETCore.Platforms"], "netstandard1.6": ["Microsoft.NETCore.Platforms"], "netstandard2.0": ["Microsoft.NETCore.Platforms"], "netstandard2.1": ["Microsoft.NETCore.Platforms"]}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "Newtonsoft.Json", "id": "Newtonsoft.Json", "version": "13.0.1", "sha512": "sha512-g3MbZi6vBTeaI/hEbvR7vBETSd1DWLe9i1E4P+nPY34v5i94zqUqDXvdWC3G+7tYN9SnsdU9zzegrnRz4h7nsQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": ["Microsoft.CSharp", "NETStandard.Library"], "netcoreapp1.1": ["Microsoft.CSharp", "NETStandard.Library"], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.1": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.2": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.3": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.4": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.5": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard1.6": ["Microsoft.CSharp", "NETStandard.Library"], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "NUnit", "id": "NUnit", "version": "3.13.2", "sha512": "sha512-foKGnF2ckq6uRAybnw1PIMDsDxdp1rbuEBJ4t2LYa5HDL80mOcEUjdbVqRDMTsKNiikfkPEBoeyGV42ZXiLLQA==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": ["NETStandard.Library"], "net6.0": ["NETStandard.Library"], "net7.0": ["NETStandard.Library"], "net8.0": ["NETStandard.Library"], "net9.0": ["NETStandard.Library"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["NETStandard.Library"], "netcoreapp2.1": ["NETStandard.Library"], "netcoreapp2.2": ["NETStandard.Library"], "netcoreapp3.0": ["NETStandard.Library"], "netcoreapp3.1": ["NETStandard.Library"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["NETStandard.Library"], "netstandard2.1": ["NETStandard.Library"]}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "NUnitLite", "id": "NUnitLite", "version": "3.13.2", "sha512": "sha512-kPGW4B0ycZAqDPLPKU058JR9onD3svLKAYEghQ1Oyy1YC8bIgtniGUKUbjqeNI3i5KnqFMxEdiHTGF0XxDG9hQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": ["NUnit"], "net40": ["NUnit"], "net403": ["NUnit"], "net45": ["NUnit"], "net451": ["NUnit"], "net452": ["NUnit"], "net46": ["NUnit"], "net461": ["NUnit"], "net462": ["NUnit"], "net47": ["NUnit"], "net471": ["NUnit"], "net472": ["NUnit"], "net48": ["NUnit"], "net5.0": ["NUnit", "NETStandard.Library"], "net6.0": ["NUnit", "NETStandard.Library"], "net7.0": ["NUnit", "NETStandard.Library"], "net8.0": ["NUnit", "NETStandard.Library"], "net9.0": ["NUnit", "NETStandard.Library"], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": ["NUnit", "NETStandard.Library"], "netcoreapp2.1": ["NUnit", "NETStandard.Library"], "netcoreapp2.2": ["NUnit", "NETStandard.Library"], "netcoreapp3.0": ["NUnit", "NETStandard.Library"], "netcoreapp3.1": ["NUnit", "NETStandard.Library"], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": ["NUnit", "NETStandard.Library"], "netstandard2.1": ["NUnit", "NETStandard.Library"]}, "targeting_pack_overrides": [], "framework_list": []},
{"name": "Runfiles", "id": "Runfiles", "version": "0.14.0", "sha512": "sha512-xncDBZgH/5m3QXFXxTOSQiooXZrEhU9hPThejXvnCmFpGrXYKWq5xWzM3Lp8sL33pTWnuWySnrdIyu5W6DZDiQ==", "sources": ["https://api.nuget.org/v3/index.json"], "dependencies": {"net11": [], "net20": [], "net30": [], "net35": [], "net40": [], "net403": [], "net45": [], "net451": [], "net452": [], "net46": [], "net461": [], "net462": [], "net47": [], "net471": [], "net472": [], "net48": [], "net5.0": [], "net6.0": [], "net7.0": [], "net8.0": [], "net9.0": [], "netcoreapp1.0": [], "netcoreapp1.1": [], "netcoreapp2.0": [], "netcoreapp2.1": [], "netcoreapp2.2": [], "netcoreapp3.0": [], "netcoreapp3.1": [], "netstandard": [], "netstandard1.0": [], "netstandard1.1": [], "netstandard1.2": [], "netstandard1.3": [], "netstandard1.4": [], "netstandard1.5": [], "netstandard1.6": [], "netstandard2.0": [], "netstandard2.1": []}, "targeting_pack_overrides": [], "framework_list": []},
Expand Down
2 changes: 0 additions & 2 deletions dotnet/test/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ csharp_library(
],
deps = [
"//dotnet/src/webdriver:webdriver-net8.0",
nuget_package("Newtonsoft.Json"),
nuget_package("NUnit"),
nuget_package("Runfiles"),
],
Expand Down Expand Up @@ -91,7 +90,6 @@ dotnet_nunit_test_suite(
":fixtures",
"//dotnet/src/webdriver:webdriver-net8.0",
nuget_package("BenderProxy"),
nuget_package("Newtonsoft.Json"),
nuget_package("NUnit"),
nuget_package("Runfiles"),
],
Expand Down
11 changes: 2 additions & 9 deletions dotnet/test/common/Environment/DriverConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,20 @@
// under the License.
// </copyright>

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.Environment;

[JsonObject]
public class DriverConfig
{
[JsonProperty]
public string DriverTypeName { get; set; }

[JsonProperty]
[JsonConverter(typeof(StringEnumConverter))]
[JsonConverter(typeof(JsonStringEnumConverter<Browser>))]
public Browser BrowserValue { get; set; }

[JsonProperty]
public string RemoteCapabilities { get; set; }

[JsonProperty]
public bool AutoStartRemoteServer { get; set; }

[JsonProperty]
public bool Logging { get; set; }
}
7 changes: 5 additions & 2 deletions dotnet/test/common/Environment/EnvironmentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
// </copyright>

using Bazel;
using Newtonsoft.Json;
using NUnit.Framework;
using OpenQA.Selenium.Internal;
using System;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text.Json;

namespace OpenQA.Selenium.Environment;

Expand Down Expand Up @@ -56,7 +56,10 @@ private EnvironmentManager()
string currentDirectory = this.CurrentDirectory;

string content = File.ReadAllText(dataFilePath);
TestEnvironment env = JsonConvert.DeserializeObject<TestEnvironment>(content);
TestEnvironment env = JsonSerializer.Deserialize<TestEnvironment>(content, new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
});

string activeDriverConfig = System.Environment.GetEnvironmentVariable("ACTIVE_DRIVER_CONFIG") ?? TestContext.Parameters.Get("ActiveDriverConfig", env.ActiveDriverConfig);
string driverServiceLocation = System.Environment.GetEnvironmentVariable("DRIVER_SERVICE_LOCATION") ?? TestContext.Parameters.Get("DriverServiceLocation", env.DriverServiceLocation);
Expand Down
10 changes: 0 additions & 10 deletions dotnet/test/common/Environment/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,25 @@
// under the License.
// </copyright>

using Newtonsoft.Json;
using System.Collections.Generic;

namespace OpenQA.Selenium.Environment;

[JsonObject]
class TestEnvironment
{
[JsonProperty]
public bool CaptureWebServerOutput { get; set; }

[JsonProperty]
public string DriverServiceLocation { get; set; }

[JsonProperty]
public bool HideWebServerCommandPrompt { get; set; }

[JsonProperty]
public string ActiveDriverConfig { get; set; }

[JsonProperty]
public string ActiveWebsiteConfig { get; set; }

[JsonProperty]
public Dictionary<string, WebsiteConfig> WebSiteConfigs { get; set; }

[JsonProperty]
public Dictionary<string, DriverConfig> DriverConfigs { get; set; }

[JsonProperty]
public TestWebServerConfig TestWebServerConfig { get; set; }
}
7 changes: 2 additions & 5 deletions dotnet/test/common/Environment/TestWebServerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@
// under the License.
// </copyright>

using Newtonsoft.Json;
using System.Text.Json.Serialization;

namespace OpenQA.Selenium.Environment;

[JsonObject]
public class TestWebServerConfig
{
[JsonProperty]
public bool CaptureConsoleOutput { get; set; }

[JsonProperty]
public bool HideCommandPromptWindow { get; set; }

[JsonProperty]
public string JavaHomeDirectory { get; set; }

[JsonIgnore]
public string Port { get; set; }
}
6 changes: 3 additions & 3 deletions dotnet/test/common/Environment/UrlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
// under the License.
// </copyright>

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Text;
using System.Text.Json.Nodes;

namespace OpenQA.Selenium.Environment;

Expand Down Expand Up @@ -125,12 +125,12 @@ public string CreateInlinePage(InlinePage page)
{
Uri createPageUri = new Uri(new Uri(WhereIs(string.Empty)), "createPage");

Dictionary<string, object> payloadDictionary = new Dictionary<string, object>
var payloadDictionary = new JsonObject
{
["content"] = page.ToString()
};

string commandPayload = JsonConvert.SerializeObject(payloadDictionary);
string commandPayload = payloadDictionary.ToJsonString();

using var httpClient = new HttpClient();

Expand Down
8 changes: 0 additions & 8 deletions dotnet/test/common/Environment/WebsiteConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,17 @@
// under the License.
// </copyright>

using Newtonsoft.Json;

namespace OpenQA.Selenium.Environment;

[JsonObject]
public class WebsiteConfig
{
[JsonProperty]
public string Protocol { get; set; }

[JsonProperty]
public string HostName { get; set; }

[JsonProperty]
public string Port { get; set; }

[JsonProperty]
public string SecurePort { get; set; }

[JsonProperty]
public string Folder { get; set; }
}
1 change: 0 additions & 1 deletion dotnet/test/common/Selenium.WebDriver.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<PackageReference Include="BenderProxy" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="Runfiles" Version="0.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <auto-generated />
// <auto-generated />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;net46;net47;netstandard2.0</TargetFrameworks>
Expand All @@ -16,8 +16,4 @@
<Description>.Net Core based runtime to interact with an running instance of Chrome via the ChromeDevTools protocol.</Description>
<PackageReleaseNotes>Chrome Version: {{chromeVersion.BrowserVersion}}; Protocol Version: {{chromeVersion.ProtocolVersion}};{{#if runtimeVersion}} Runtime Version: {{runtimeVersion}};{{/if}}</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
</Project>