Conversation
| # TODO: Remove the fallback | ||
| return self.mark_extension_absence(ext_name).execute(Command.GET_CURRENT_ACTIVITY)['value'] | ||
| except WebDriverException as e: | ||
| if isinstance(e, UnknownMethodException) or self.is_missing_command(e.msg): |
There was a problem hiding this comment.
could it be the server throws anything else other than UnknownMethodException in case of missing method?
There was a problem hiding this comment.
UnknownMethodException is only raised by
python-client/appium/webdriver/webdriver.py
Lines 505 to 517 in a369b6f
There was a problem hiding this comment.
This must be a bug in the Python client itself. I believe it does not properly map the exception raised by the server because this works as expected with Java
There was a problem hiding this comment.
oh, then, i guess in selenium client side..? Quickly checked with ruby client. it also actually handled as Selenium::WebDriver::Error::UnknownCommandError. I'll take a look this weekend
There was a problem hiding this comment.
No worries, I have already prepared a fix: #869
Thanks for pointing this out, I did not know it's so broken. Seems like the actual error handling code in selenium client has not been updated since ages and only supports responses in JWP format
There was a problem hiding this comment.
thanks, gotcha. Then this pr is no longer needed
| def mark_extension_absence(self: T, ext_name: str) -> T: | ||
| ... | ||
|
|
||
| def is_missing_command(self: T, error_msg: Union[str, None]) -> bool: |
There was a problem hiding this comment.
protocols must not contain method implementations
There was a problem hiding this comment.
yea, i noticed the implementation was in webdriver.py
for #865
Still initial implementation.