-
-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Description
UiSelector().textContains(\"some value\") and UiSelector().text(\"some value\") seem broken but UiSelector().descriptionContains(\"some value\"), UiSelector().description(\"some value\"), UiSelector().resourceId(\"some value\") work fine in my environments.
So, I'd like to update some convenience methods to avoid some errors or investigate and fix https://github.com/appium/appium-uiautomator2-server or use XPath mainly for Android such as java-client.
For example, we can replace current find/s_exact to the following method. (be able to find visible elements)
find/s_exact
find_element/s :xpath, "//*[@text='#{value}' or @content-desc='#{value}' or @resource-id='#{value}']"
I should investigate some contains work or not. If contains works, I can replace contains method.
//#{class_name}[@visible="true" and contains(translate(@#{attr},'#{value.upcase}', '#{value}'), '#{value}')]
Metadata
Metadata
Assignees
Labels
No labels