feat: Add support for w3c options#720
Merged
mykola-mokhnach merged 2 commits intoappium:masterfrom Jun 10, 2022
Merged
Conversation
Contributor
Author
KazuCocoa
reviewed
Jun 10, 2022
| desired_caps = desired_capabilities.get_desired_capabilities('ApiDemos-debug.apk.zip') | ||
| self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) | ||
| self.driver = webdriver.Remote( | ||
| 'http://localhost:4723/wd/hub', options=UiAutomator2Options().load_capabilities(desired_caps) |
Member
There was a problem hiding this comment.
Seems good, overall.
One confirmation is... when a user wants to set an arbitrary automation name etc (not defined in this client one), they can use:
options = AppiumOptions()
options.automation_name('arbitrary name').set_capability('ownCapability', 'the value')...
...
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', options=options)
, correct?
Contributor
Author
There was a problem hiding this comment.
yes, that's correct
Contributor
Author
There was a problem hiding this comment.
small correction to the above code:
options = AppiumOptions()
options.automation_name = 'arbitrary name'
options.set_capability('ownCapability', 'the value')\
.set_capability('appium:ownCapability2', 'the value')
....
KazuCocoa
approved these changes
Jun 10, 2022
Member
KazuCocoa
left a comment
There was a problem hiding this comment.
Need to fix tests, otherwise lgtm 👍
| 'unhandledPromptBehavior', | ||
| ] | ||
| ) | ||
| _OSS_W3C_CONVERSION = { |
jlipps
reviewed
Jun 10, 2022
Member
jlipps
left a comment
There was a problem hiding this comment.
I didn't review the code but the overall end result seems good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is just POC to demonstrate my vision for W3C Options support in Python client.
If we accept it then it would be necessary to add all the supported capabilities like we did in Java, although this could be done gradually in multiple PRs.