What happened?
The BiDi type Scipt.LocalValue.Map should be passable to the Script.CallFunctionAsync method. However, it fails with a strange exception.
Per the spec, the Map is serialized the same was an Object is:

An Object is an IEnumerable<IEnumerable<LocalValue>>, and works fine in this scenario. For that reason, I am suspicious if Map should be changed into the same shape.
Same thing applies for the returned RemoteValue.Map.
How can we reproduce the issue?
#
var bidi = await driver.AsBiDiAsync();
var context = (await bidi.BrowsingContext.GetTreeAsync())[0].Context;
var map = new LocalValue.Map(new Dictionary<string, LocalValue>
{
{"key", new LocalValue.String("value") }
});
var response = await context.Script.CallFunctionAsync($$"""
(arg) => {
return arg;
}
""", false, new() { Arguments = [map] });
Relevant log output
Message:
OpenQA.Selenium.BiDi.BiDiException : invalid argument: Invalid input in "arguments"/0.
Stack Trace:
Broker.ExecuteCommandCoreAsync[TCommand](TCommand command, CommandOptions options) line 216
Broker.ExecuteCommandAsync[TCommand,TResult](TCommand command, CommandOptions options) line 186
Operating System
N/A
Selenium version
trunk
What are the browser(s) and version(s) where you see this issue?
chrome 133.0.6943.143
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 133.0.6943.141
Are you using Selenium Grid?
No response
What happened?
The BiDi type
Scipt.LocalValue.Mapshould be passable to theScript.CallFunctionAsyncmethod. However, it fails with a strange exception.Per the spec, the

Mapis serialized the same was anObjectis:An Object is an
IEnumerable<IEnumerable<LocalValue>>, and works fine in this scenario. For that reason, I am suspicious ifMapshould be changed into the same shape.Same thing applies for the returned
RemoteValue.Map.How can we reproduce the issue?
Relevant log output
Operating System
N/A
Selenium version
trunk
What are the browser(s) and version(s) where you see this issue?
chrome 133.0.6943.143
What are the browser driver(s) and version(s) where you see this issue?
chromedriver 133.0.6943.141
Are you using Selenium Grid?
No response