Skip to content

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

Merged
merged 4 commits into from
Aug 9, 2018
Merged

add tag view for android #238

merged 4 commits into from
Aug 9, 2018

Conversation

KazuCocoa
Copy link
Member

add -android viewtag for Espresso Driver #237

@@ -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'
Copy link
Contributor

Choose a reason for hiding this comment

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

ANDROID_VIEWTAG?

@@ -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):
Copy link
Contributor

Choose a reason for hiding this comment

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

simply tag

https://developer.android.com/reference/android/view/View

:Args:
- tag_string - The element name by tag view in Android
Copy link
Contributor

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

@@ -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.
Copy link
Contributor

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

Copy link
Member Author

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.

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