An element is not being found in Android 6.0 but is found in Android 5.1.1

I have an element in an overflow menu that on Android 6.0 is not found. Appium will open the overflow menu but then it will not “see” any of the menu items.

If I run the same test on Android 5.1.1 it will work fine.

Appium 1.5.1

Android 5.1.1 and 6.0 on real devices

Works on 5.1.1:
//[@text=“Settings”]
//
[@value=”Settings”]

I have tried several different xpaths on 6.0 and nothing
works.

Is there something new I need to do on an overflow menu for
Android 6.0

trace.txt (38.9 KB)

Could it be perhaps you’re requesting to use Selendroid over Uiautomator? What happens if you drop the “automationName” capability?

I dropped the automationName and Android 6.0 will now work (it will click on the element).
This causes other issues with some of the touch actions that I have but I should be able to get those to work.

Thanks!

Selendroid is intended to be used for Android devices that are running Android system versions older than 4.2. The Uiautomator APIs were added in API 17, AKA Android 42.