-
Notifications
You must be signed in to change notification settings - Fork 566
add tag view for android #238
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
appium/webdriver/common/mobileby.py
Outdated
@@ -20,5 +20,6 @@ class MobileBy(By): | |||
IOS_UIAUTOMATION = '-ios uiautomation' | |||
IOS_CLASS_CHAIN = '-ios class chain' | |||
ANDROID_UIAUTOMATOR = '-android uiautomator' | |||
ANDROID_TAGVIEW = '-android viewtag' |
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.
ANDROID_VIEWTAG?
appium/webdriver/webdriver.py
Outdated
@@ -341,6 +341,30 @@ def find_elements_by_android_uiautomator(self, uia_string): | |||
""" | |||
return self.find_elements(by=By.ANDROID_UIAUTOMATOR, value=uia_string) | |||
|
|||
def find_element_by_android_viewtag(self, tag_string): |
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.
simply tag
appium/webdriver/webdriver.py
Outdated
https://developer.android.com/reference/android/view/View | ||
|
||
:Args: | ||
- tag_string - The element name by tag view in Android |
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 tag name of the view to look for
appium/webdriver/webdriver.py
Outdated
@@ -341,6 +341,30 @@ def find_elements_by_android_uiautomator(self, uia_string): | |||
""" | |||
return self.find_elements(by=By.ANDROID_UIAUTOMATOR, value=uia_string) | |||
|
|||
def find_element_by_android_viewtag(self, tag): | |||
"""Finds element by tag in Android. |
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.
Perhaps, it worth to mentions that such locator only works for Espresso driver
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.
👍 Yeah, I'm appending find_element_by_android_viewtag
section in README. I'll mention the point here as well.
add
-android viewtag
for Espresso Driver #237