-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[dotnet] Handle unsuccessful http requests properly #10807
Conversation
Thanks for the PR. I'm still learning the .NET classes. Why can't that code you deleted be executed? Thanks. |
In version 4 selenium was migrated from For instance timeout exception now looks like this:
in .net framework 4.8
Or if cannot connect to the server:
in .net framework 4.8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your fix won't work because there are lots of unsuccessful status codes that are valid: https://w3c.github.io/webdriver/#errors
Ah, I see what is going on. Sauce Labs returns a different signature than Browser Stack, which is why it isn't having the same issue for a 401 error. The issue is when this condition isn't met in
Since all valid webdriver responses have to be those things, this is going to apply when either the http response isn't coming from a driver/server (i.e. bad request in I think what we want to do is throw a
|
It was hard to understand, and finally it works for me. I didn't touch or changed logic in making http requests, generally, don't throw any exceptions. Current Logic: What I did: @titusfortner thanks for your suggestion and please review. |
I didn't verify whether the solution is still compiling without errors, I wrote this code in notepad.
Fixes #10805