Skip to content
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

feat: add AppiumBy instead of MobileBy #659

Merged
merged 3 commits into from
Nov 26, 2021
Merged

Conversation

KazuCocoa
Copy link
Member

part of #645

from selenium.webdriver.common.by import By


class AppiumBy(By):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer it to not be a breaking change. E.g. keep the MobileBy strategy, but simply mark it as deprecated
AppiumBy may then be inherited from MobileBy to avoid unnecessary duplication.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MobileBy.ID in appium/webdriver/common/mobileby.py (inherits AppiumBy) etc are str. AppiumBy.ID also str. So basically both ID are set as id to find_element, for example.
I think they do not have breaking change... something wrong?

Yea, I was finding the way to print deprecation message when MobileBy.ID was called or when MobileBy.ID was given in find_element. But it was simply str.
So currently I've put the deprecation message in the module description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mm, the deprecation package also does not work for str of class variables?

Yea, I think only documentation can mention it.

@KazuCocoa
Copy link
Member Author

mm, it looks like current building docs partially depend on the published python client module.
Will check after pushing a new one (deprecated marks)

@KazuCocoa KazuCocoa marked this pull request as ready for review November 25, 2021 20:01
@KazuCocoa KazuCocoa merged commit b70422b into appium:master Nov 26, 2021
@KazuCocoa KazuCocoa deleted the appiumby branch November 26, 2021 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants