-
Notifications
You must be signed in to change notification settings - Fork 572
fix: W3C errors to exception classes mapping #869
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
Conversation
|
I have created a pr for selenium as SeleniumHQ/selenium#12255 |
|
Hi, I'd like to ask a question about changes in this PR. By changes in this PR, class MobileErrorHandler(errorhandler.ErrorHandler):
def check_response(self, response: Dict[str, Any]) -> None:
"""
https://www.w3.org/TR/webdriver/#errors
"""
payload = response.get('value', '')
try:
payload_dict = json.loads(payload)
except (json.JSONDecodeError, TypeError):
return
...When the following error response (taken from the example 3) is passed to this method, {
"value": {
"error": "invalid session id",
"message": "No active session with ID 1234",
"stacktrace": ""
}
}
|
|
Something issue occurred? Probably current Selenium Python client gives something like So I think the selenium python client still provides the nested |
|
Perhaps I haven't checked with latest selenium client dependency, so potentially we should update the handler if it has an issue |
|
After some investigation, it turned out that the issue in my side was caused by our special usage of appium-python-client. I'm sorry for bothering you. Though I can't describe details in public, we are still supporting very very old WebKit webview in our application. It requires very old version of Chromedriver to automate. Appium server proxies request between appium-python-client and the Chromedriver. Since the Chromedriver is very old, its response is a bit different from what the latest appium-python-client assumes. It caused the issue and it is totally an issue of our side. |
|
Got it, thanks for the info. Feel free to create a ticket if our client needs to have something for Appium-specific things to help it |
It turns out the current selenium python client does not match error codes properly, at least for W3C responses.