Case differences in text value captured between Emulator & real device

Hi ,

I have created the appium scripts for Android real device (version 6) and scripts are working fine. When I try running the same script in emulator(Androidversion 7 )the scripts failed .

Eg :On looking at objects in Uiautomator viewer what i observed is the text value for object is ‘Men’ in real device ,where as for the same object in emulator its displayed as ‘MEN’. Is the issue because of difference in Android version

Since there were no other ids I have used
driver.findElementByXPath("//*[@text=‘MEN’]") to find the element . Can some one please help me with this