-
Notifications
You must be signed in to change notification settings - Fork 187
BREAKING CHANGE: AndroidDriver to use modern mobile: commands for Lock, IsLocked and Unlock
#874
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
| parameters["seconds"] = seconds.Value; | ||
| } | ||
|
|
||
| ExecuteScript("mobile: lock", parameters); |
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.
You could add try/except and fallback to the legacy one like https://github.com/appium/python-client/blob/e4f06abf1f6bc302bde373071d1e3c007a67c03a/appium/webdriver/extensions/hw_actions.py#L40-L47 does. Then, maybe the change doesn't need to be a "breaking" one since the existing one will do the same
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.
The "breaking" is more for the unlock method that now requires additional parameters
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.
I also see there is a a todo on that fallback
https://github.com/appium/python-client/blob/e4f06abf1f6bc302bde373071d1e3c007a67c03a/appium%2Fwebdriver%2Fextensions%2Fhw_actions.py#L45
So isn't it redundant?
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.
Yea, the todo is correct. We haven't decided when we completely remove them, though. I'm good either, just I brought up the idea here
KazuCocoa
left a comment
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.
lgtm.
Perhaps it would be nice to include similar breaking changes in one release if we have others
|
I'll try to find some time, sure |
List of changes
mobile: lock,mobile: isLocked, andmobile: unlockextensions.Lockmethod to accept an optionalsecondsparameter for auto-unlock functionality.Unlockmethod to support requiredkeyandtypeparameters, with optionalstrategyandtimeoutMsarguments.Types of changes
What types of changes are you proposing/introducing to the .NET client?
Put an
xin the boxes that applyDocumentation
This can be done by navigating to the documentation section on http://appium.io selecting the appropriate command/endpoint and clicking the 'Edit this doc' link to update the C# example
Integration tests
Details
Please provide more details about changes if necessary. You can provide code samples showing how they work and possible use cases if there are new features. Also, you can create gists with pasted C# code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub