Skip to content

[πŸ› Bug]: [dotnet]: RemoteSessionSettings should allow JsonNode metadata settingsΒ #14725

@RenderMichael

Description

@RenderMichael

What happened?

Selenium should accept System.Text.Json types, since that's what is used internally to serialize the request.

(It would also be nice to add explicit overloads to RemoteSessionSettings.AddMetadataSetting so it's clear what types are accepted and what types aren't.)

How can we reproduce the issue?

using OpenQA.Selenium;
using System.Text.Json.Nodes;

var remoteSessionSettings = new RemoteSessionSettings();
remoteSessionSettings.AddMetadataSetting("example", JsonNode.Parse("true"));

Relevant log output

System.ArgumentException: 'Metadata setting value must be JSON serializable. (Parameter 'settingValue')'

Operating System

Windows 11

Selenium version

.NET Selenium.WebDriver 4.26.1

What are the browser(s) and version(s) where you see this issue?

N/A (didn't get that far)

What are the browser driver(s) and version(s) where you see this issue?

N/A

Are you using Selenium Grid?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-dotnet.NET BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions