← 输入框|github.com|刷新
Skip to content

add tag view for android - #238

Merged
KazuCocoa merged 4 commits into
appium:masterfrom
KazuCocoa:add-tag-view
Aug 9, 2018
Merged

KazuCocoa merged 4 commits into
appium:masterfrom
KazuCocoa:add-tag-view

Conversation

@KazuCocoa

Copy link
Copy Markdown
Member

add -android viewtag for Espresso Driver #237

Comment thread appium/webdriver/common/mobileby.py Outdated
IOS_UIAUTOMATION = '-ios uiautomation'
IOS_CLASS_CHAIN = '-ios class chain'
ANDROID_UIAUTOMATOR = '-android uiautomator'
ANDROID_TAGVIEW = '-android viewtag'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ANDROID_VIEWTAG?

Comment thread appium/webdriver/webdriver.py Outdated
"""
return self.find_elements(by=By.ANDROID_UIAUTOMATOR, value=uia_string)

def find_element_by_android_viewtag(self, tag_string):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

simply tag

Comment thread appium/webdriver/webdriver.py Outdated
https://developer.android.com/reference/android/view/View

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

Copy link
Copy Markdown
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

Comment thread appium/webdriver/webdriver.py Outdated
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
Copy Markdown
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
Copy Markdown
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