I have an appium script that works on my physical device running android 5.1 when I id using uiautomatorviewer and match via id. When I switch from By.id(“idstr”) to By.xpath(“xpathstr”) it cannot find the textview with text ‘HELLO’
This is an activity with just a textview. The xpath strings I’ve tried are:
“//android.widget.TextView[text() = ‘HELLO’]”
“TextView[text() = ‘HELLO’]”
“//android.widget.TextView[contains(., ‘HELLO’)]”
“TextView[contains(., ‘HELLO’)]”
It sounds like xpath selectors only work on older apis? I cannot test because I couldn’t get appium to run with my emulator