-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-dotnet.NET Bindings.NET BindingsI-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
Exception for changing driver's NetworkConditions.
Fix should be like https://github.com/SeleniumHQ/selenium/pull/14697/files but add line [JsonSerializable(typeof(ChromiumNetworkConditions))]
Error:
System.NotSupportedException : JsonTypeInfo metadata for type 'OpenQA.Selenium.Chromium.ChromiumNetworkConditions' was not provided by TypeInfoResolver of type 'OpenQA.Selenium.CommandJsonSerializerContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically ```
### How can we reproduce the issue?
```shell
Execute code:
driver.NetworkConditions = new ChromiumNetworkConditions
{
IsOffline = false,
DownloadThroughput = 5000,
UploadThroughput = 5000,
Latency = TimeSpan.FromMilliseconds(5)
};
Relevant log output
System.NotSupportedException : JsonTypeInfo metadata for type 'OpenQA.Selenium.Chromium.ChromiumNetworkConditions' was not provided by TypeInfoResolver of type 'OpenQA.Selenium.CommandJsonSerializerContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphicallyOperating System
windows, linux
Selenium version
dotnet 4.26.0, 4.26.1
What are the browser(s) and version(s) where you see this issue?
chrome 130
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver
Are you using Selenium Grid?
No
Metadata
Metadata
Assignees
Labels
C-dotnet.NET Bindings.NET BindingsI-defectSomething is not working as intendedSomething is not working as intended