-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Runtime type check webdriver.client #51816
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
Runtime type check webdriver.client #51816
Conversation
This has been dead since it was first added in 7033fdd, and its __setitem__ is pretty broken (referring to a bogus WebDriver command, seemingly confusing name and value, and referring to some mysterious value.value).
Having locally seen a request to POST `/session/None/timeouts`, clearly we aren't doing enough validation. This may well be indicative of bugs in the library, but we shouldn't be accidentally stringifying non-str types and sending them over the wire.
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.
Changes look good, but are any of these errors hit in a full run?
I haven't actually tried a full run; the times I've seen this are mostly cases where the browser has crashed in the middle of a wdspec test, where we're meant to create a new session for each command (which is also kinda suspect behaviour!) but then the relevant API doesn't. That should also be fixed, but it's a separate issue to this. |
While trying to rollout a newer WPT into Chromium this PR showed regression into two tests:
The run is located here. The failures are: For close_window/close:
For delete_session/delete:
I'm not familiar at all with the code and what it tries to do. Is it something wrong with the tests? The patch? |
Having locally seen a request to POST
/session/None/timeouts
, clearly we aren't doing enough validation. This may well be indicative of bugs in the library, but we shouldn't be accidentally stringifying non-str types and sending them over the wire.While we're at it, remove
webdriver.client.Cookies
because this has been dead since it was first added in 7033fdd and its__setitem__
is pretty broken (referring to a bogus WebDriver command, seemingly confusing name and value, and referring to some mysteriousvalue.value
), and adding a type check there just makes it more apparent how bogus it is.