How to select by text with AppiumBy.ANDROID_UIAUTOMATOR

Hi All,

I’m currently selecting some elements by text via this approach and it works (Python):
find_element_by_android_uiautomator(‘text("%s")’ % locatorvalue)

However, I get [Deprecated] Please use ‘find_element’ with ‘AppiumBy.ANDROID_UIAUTOMATOR’ instead.

So when I try to use it as suggested:
find_element(AppiumBy.ANDROID_UIAUTOMATOR(‘text("%s")’ % locatorvalue))

it doesn’t find the element.
Also tried with new UiSelector().text("%s") - also doesn’t work.

Can anyone, please, explain how to use it?

Try: find_element(AppiumBy.ANDROID_UIAUTOMATOR,“text(%s)” % locator_value))

Unfortunately, this solution:
find_element(AppiumBy.ANDROID_UIAUTOMATOR,“text(%s)” % locator_value))
doesn’t work in my case.

Is anybody here, who has a working solution for this problem?

Hello. I have the same problem. Did you find a solution?