Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: dotnet NotSupportedException on changing NetworkConditions #14712

Closed
pnatashap opened this issue Nov 5, 2024 · 3 comments
Closed

Comments

@pnatashap
Copy link
Contributor

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 polymorphically

Operating 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

Copy link

github-actions bot commented Nov 5, 2024

@pnatashap, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@pnatashap pnatashap changed the title [🐛 Bug]: [🐛 Bug]: dotnet NotSupportedException on changing NetworkConditions Nov 5, 2024
@nvborisenko
Copy link
Member

Fixed and will be available in the next release.

Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants